/**
* Target files for zip or unzip.
*/
- protected final List<String> targetFiles = new ArrayList<String>();
+ protected final List<String> targetFiles = new ArrayList<>();
private static String getString(final String key) {
return AppConsts.RESOURCE_BUNDLE.getString(key);
--- /dev/null
+package org.dict.zip.cli;
+
+import org.dict.zip.DictZipHeader;
+import org.testng.annotations.Test;
+
+import java.util.ArrayList;
+
+import static org.testng.Assert.*;
+
+/**
+ * Created by miurahr on 16/04/09.
+ */
+public class CommandLineTest {
+ @Test
+ public void testParse_help() throws Exception {
+ final String[] argv = new String[1];
+ argv[0] = "-h";
+ CommandLine commandLine = new CommandLine();
+ commandLine.parse(argv);
+ }
+
+ @Test
+ public void testParse_helpLong() throws Exception {
+ final String[] argv = new String[1];
+ argv[0] = "--help";
+ CommandLine commandLine = new CommandLine();
+ commandLine.parse(argv);
+ }
+
+ @Test
+ public void testParse_version() throws Exception {
+ final String[] argv = new String[1];
+ argv[0] = "-v";
+ CommandLine commandLine = new CommandLine();
+ commandLine.parse(argv);
+ }
+
+ @Test
+ public void testParse_versionLong() throws Exception {
+ final String[] argv = new String[1];
+ argv[0] = "--version";
+ CommandLine commandLine = new CommandLine();
+ commandLine.parse(argv);
+ }
+
+ @Test
+ public void testParse_license() throws Exception {
+ final String[] argv = new String[1];
+ argv[0] = "-L";
+ CommandLine commandLine = new CommandLine();
+ commandLine.parse(argv);
+ }
+
+ @Test
+ public void testParse_licenseLong() throws Exception {
+ final String[] argv = new String[1];
+ argv[0] = "--license";
+ CommandLine commandLine = new CommandLine();
+ commandLine.parse(argv);
+ }
+
+ @Test
+ public void testParse_keep() throws Exception {
+ final String[] argv = new String[1];
+ argv[0] = "-k";
+ CommandLine commandLine = new CommandLine();
+ commandLine.parse(argv);
+ assertTrue(commandLine.options.isKeep());
+ }
+
+ @Test
+ public void testParse_keepLong() throws Exception {
+ final String[] argv = new String[1];
+ argv[0] = "--keep";
+ CommandLine commandLine = new CommandLine();
+ commandLine.parse(argv);
+ assertTrue(commandLine.options.isKeep());
+ }
+
+ @Test
+ public void testParse_stdout() throws Exception {
+ final String[] argv = new String[1];
+ argv[0] = "-c";
+ CommandLine commandLine = new CommandLine();
+ commandLine.parse(argv);
+ assertTrue(commandLine.options.isStdout());
+ }
+
+ @Test
+ public void testParse_stdoutLong() throws Exception {
+ final String[] argv = new String[1];
+ argv[0] = "--stdout";
+ CommandLine commandLine = new CommandLine();
+ commandLine.parse(argv);
+ assertTrue(commandLine.options.isStdout());
+ }
+
+ @Test
+ public void testParse_force() throws Exception {
+ final String[] argv = new String[1];
+ argv[0] = "-f";
+ CommandLine commandLine = new CommandLine();
+ commandLine.parse(argv);
+ assertTrue(commandLine.options.isForce());
+ }
+
+ @Test
+ public void testParse_forceLong() throws Exception {
+ final String[] argv = new String[1];
+ argv[0] = "--force";
+ CommandLine commandLine = new CommandLine();
+ commandLine.parse(argv);
+ assertTrue(commandLine.options.isForce());
+ }
+
+ @Test
+ public void testParse_decompress() throws Exception {
+ final String[] argv = new String[1];
+ argv[0] = "-d";
+ CommandLine commandLine = new CommandLine();
+ commandLine.parse(argv);
+ assertTrue(commandLine.options.isDecompress());
+ }
+
+ @Test
+ public void testParse_decompressLong() throws Exception {
+ final String[] argv = new String[1];
+ argv[0] = "--decompress";
+ CommandLine commandLine = new CommandLine();
+ commandLine.parse(argv);
+ assertTrue(commandLine.options.isDecompress());
+ }
+
+ @Test
+ public void testParse_list() throws Exception {
+ final String[] argv = new String[1];
+ argv[0] = "-l";
+ CommandLine commandLine = new CommandLine();
+ commandLine.parse(argv);
+ assertTrue(commandLine.options.isList());
+ }
+
+ @Test
+ public void testParse_listLong() throws Exception {
+ final String[] argv = new String[1];
+ argv[0] = "--list";
+ CommandLine commandLine = new CommandLine();
+ commandLine.parse(argv);
+ assertTrue(commandLine.options.isList());
+ }
+
+ @Test
+ public void testParse_levelFast() throws Exception {
+ final String[] argv = new String[1];
+ argv[0] = "-1";
+ CommandLine commandLine = new CommandLine();
+ commandLine.parse(argv);
+ assertEquals(commandLine.options.getLevel(), DictZipHeader.CompressionLevel.BEST_SPEED);
+ }
+
+ @Test
+ public void testParse_levelFastLong() throws Exception {
+ final String[] argv = new String[1];
+ argv[0] = "--fast";
+ CommandLine commandLine = new CommandLine();
+ commandLine.parse(argv);
+ assertEquals(commandLine.options.getLevel(), DictZipHeader.CompressionLevel.BEST_SPEED);
+ }
+
+ @Test
+ public void testParse_levelBest() throws Exception {
+ final String[] argv = new String[1];
+ argv[0] = "-9";
+ CommandLine commandLine = new CommandLine();
+ commandLine.parse(argv);
+ assertEquals(commandLine.options.getLevel(), DictZipHeader.CompressionLevel.BEST_COMPRESSION);
+ }
+
+ @Test
+ public void testParse_levelBestLong() throws Exception {
+ final String[] argv = new String[1];
+ argv[0] = "--best";
+ CommandLine commandLine = new CommandLine();
+ commandLine.parse(argv);
+ assertEquals(commandLine.options.getLevel(), DictZipHeader.CompressionLevel.BEST_COMPRESSION);
+ }
+
+ @Test
+ public void testParse_levelDefault() throws Exception {
+ final String[] argv = new String[1];
+ argv[0] = "-6";
+ CommandLine commandLine = new CommandLine();
+ commandLine.parse(argv);
+ assertEquals(commandLine.options.getLevel(), DictZipHeader.CompressionLevel.DEFAULT_COMPRESSION);
+ }
+
+ @Test
+ public void testParse_target() throws Exception {
+ final String[] argv = new String[1];
+ argv[0] = "target_filename";
+ CommandLine commandLine = new CommandLine();
+ commandLine.parse(argv);
+ assertTrue(commandLine.getTargetFiles().equals(new ArrayList<String> (){{add("target_filename");}}));
+ }
+
+}
\ No newline at end of file
import java.net.URL;
import org.dict.zip.DictZipHeader;
+import org.dict.zip.DictZipFileUtils;
import org.testng.annotations.Test;
instance.doZip(DictZipHeader.CompressionLevel.DEFAULT_COMPRESSION);
File resultFile = new File(testFile + ".dz");
File expectFile = new File(this.getClass().getResource("/test_dozip.dict.dz.expected").getFile());
- assertTrue(StaticUtils.isFileBinaryEquals(resultFile, expectFile, 10, 512));
+ assertTrue(DictZipFileUtils.isFileBinaryEquals(resultFile, expectFile, 10, 512));
resultFile.deleteOnExit();
}
File resultFile = new File(zippedFile);
File expectFile = new File(this.getClass().getResource("/test_dozip.dict.dz.expected.best")
.getFile());
- assertTrue(StaticUtils.isFileBinaryEquals(resultFile, expectFile, 10, 512));
+ assertTrue(DictZipFileUtils.isFileBinaryEquals(resultFile, expectFile, 10, 512));
resultFile.deleteOnExit();
}
File resultFile = new File(zippedFile);
File expectFile = new File(this.getClass().getResource("/test_dozip.dict.dz.expected.fast")
.getFile());
- assertTrue(StaticUtils.isFileBinaryEquals(resultFile, expectFile, 10, 512));
+ assertTrue(DictZipFileUtils.isFileBinaryEquals(resultFile, expectFile, 10, 512));
resultFile.deleteOnExit();
}
URL resultUrl = this.getClass().getResource("/test.dict");
File resultFile = new File(resultUrl.getFile());
URL expectedUrl = this.getClass().getResource("/test.dict.expected");
- assertTrue(StaticUtils.isFileBinaryEquals(resultFile, new File(expectedUrl.getFile())));
+ assertTrue(DictZipFileUtils.isFileBinaryEquals(resultFile, new File(expectedUrl.getFile())));
resultFile.deleteOnExit();
}
}
package org.dict.zip;
-import java.io.BufferedInputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
+import java.io.*;
import java.util.Arrays;
/**
* Created by Hiroshi Miura on 16/04/09.
*/
-class DictZipFileUtils {
- private DictZipFileUtils() {}
+public class DictZipFileUtils {
+ /**
+ * Reads unsigned byte.
+ *
+ * @param in input stream to read.
+ * @return unsigned byte value.
+ * @throws IOException when error in file reading.
+ */
+ public static int readUByte(final InputStream in) throws IOException {
+ int b = in.read();
+ if (b == -1) {
+ throw new EOFException();
+ }
+ return b;
+ }
+
+ /**
+ * Reads unsigned integer in Intel byte order.
+ *
+ * @param in input stream to read.
+ * @return unsigned integer value.
+ * @throws IOException when error in file reading.
+ */
+ public static long readUInt(final InputStream in) throws IOException {
+ long s = readUShort(in);
+ return ((long) readUShort(in) << 16) | s;
+ }
+
+ /**
+ * Reads unsigned short in Intel byte order.
+ *
+ * @param in input stream to read.
+ * @return unsigned short value.
+ * @throws IOException when error in file reading.
+ */
+ public static int readUShort(final InputStream in) throws IOException {
+ int b = readUByte(in);
+ return ((int) readUByte(in) << 8) | b;
+ }
+
+ /**
+ * Writes integer in Intel byte order.
+ *
+ * @param out output stream to write.
+ * @param i integer to write.
+ * @throws IOException when error in file output.
+ */
+ public static void writeInt(final OutputStream out, final int i) throws IOException {
+ writeShort(out, i & 0xffff);
+ writeShort(out, (i >> 16) & 0xffff);
+ }
+
+ /**
+ * Writes short integer in Intel byte order.
+ *
+ * @param out output stream to write.
+ * @param s short integer to write.
+ * @throws IOException when error in file output.
+ */
+ public static void writeShort(final OutputStream out, final int s) throws IOException {
+ out.write(s & 0xff);
+ out.write((s >> 8) & 0xff);
+ }
/**
* Compare binary files. Both files must be files (not directories) and exist.
* @return boolean - true if files are binery equal
* @throws IOException - error in function
*/
- static boolean isFileBinaryEquals(File first, File second) throws IOException {
+ public static boolean isFileBinaryEquals(File first, File second) throws IOException {
return isFileBinaryEquals(first, second, 0, first.length());
}
* @return boolean - true if files are binery equal
* @throws IOException - error in function
*/
- static boolean isFileBinaryEquals( File first, File second, final long off, final long len) throws IOException {
+ public static boolean isFileBinaryEquals( File first, File second, final long off, final long len) throws IOException {
boolean result= false;
final int BUFFER_SIZE = 65536;
final int COMP_SIZE = 512;
return result;
}
+
+ private DictZipFileUtils() {
+ }
}
package org.dict.zip;
-import java.io.EOFException;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
crc.reset();
// Check header magic
- if (readUShort(in) != GZIP_MAGIC) {
+ if (DictZipFileUtils.readUShort(in) != GZIP_MAGIC) {
throw new IOException("Not in GZIP format");
}
// Check compression method
- if (readUByte(in) != Deflater.DEFLATED) {
+ if (DictZipFileUtils.readUByte(in) != Deflater.DEFLATED) {
throw new IOException("Unsupported compression method");
}
// Read flags
- int flg = readUByte(in);
+ int flg = DictZipFileUtils.readUByte(in);
for (int i = 0; i < GZIPFLAG_SIZE; i++) {
int testbit = 1 << i;
if ((flg & testbit) == testbit) {
h.gzipFlag.set(i);
}
}
- h.mtime = readUInt(in);
- int compFlg = readUByte(in);
+ h.mtime = DictZipFileUtils.readUInt(in);
+ int compFlg = DictZipFileUtils.readUByte(in);
if (compFlg == 0x02) {
h.extraFlag = CompressionLevel.BEST_COMPRESSION;
} else if (compFlg == 0x04) {
} else {
throw new IOException("Corrupt GZIP header");
}
- int hos = readUByte(in);
+ int hos = DictZipFileUtils.readUByte(in);
h.headerOS = OperatingSystem.UNKNOWN;
for (OperatingSystem os: OperatingSystem.values()) {
if (hos == os.value) {
h.headerLength = DICTZIP_HEADER_LEN;
// Optional extra field
if (h.gzipFlag.get(FEXTRA)) {
- h.extraLength = readUShort(in);
+ h.extraLength = DictZipFileUtils.readUShort(in);
h.headerLength += h.extraLength + 2;
- h.subfieldID1 = (byte) readUByte(in);
- h.subfieldID2 = (byte) readUByte(in);
- h.subfieldLength = readUShort(in); // 2 bytes subfield length
- h.subfieldVersion = readUShort(in); // 2 bytes subfield version
- h.chunkLength = readUShort(in); // 2 bytes chunk length
- h.chunkCount = readUShort(in); // 2 bytes chunk count
+ h.subfieldID1 = (byte) DictZipFileUtils.readUByte(in);
+ h.subfieldID2 = (byte) DictZipFileUtils.readUByte(in);
+ h.subfieldLength = DictZipFileUtils.readUShort(in); // 2 bytes subfield length
+ h.subfieldVersion = DictZipFileUtils.readUShort(in); // 2 bytes subfield version
+ h.chunkLength = DictZipFileUtils.readUShort(in); // 2 bytes chunk length
+ h.chunkCount = DictZipFileUtils.readUShort(in); // 2 bytes chunk count
h.chunks = new int[h.chunkCount];
for (int i = 0; i < h.chunkCount; i++) {
- h.chunks[i] = readUShort(in);
+ h.chunks[i] = DictZipFileUtils.readUShort(in);
}
}
// Skip optional file name
if (h.gzipFlag.get(FNAME)) {
StringBuilder sb = new StringBuilder();
int ubyte;
- while ((ubyte = readUByte(in)) != 0) {
+ while ((ubyte = DictZipFileUtils.readUByte(in)) != 0) {
sb.append((char) (ubyte & 0xff));
h.headerLength++;
}
}
// Skip optional file comment
if (h.gzipFlag.get(FCOMMENT)) {
- while (readUByte(in) != 0) {
+ while (DictZipFileUtils.readUByte(in) != 0) {
h.headerLength++;
}
h.headerLength++;
// Check optional header CRC
if (h.gzipFlag.get(FHCRC)) {
int v = (int) crc.getValue() & 0xffff;
- if (readUShort(in) != v) {
+ if (DictZipFileUtils.readUShort(in) != v) {
throw new IOException("Corrupt GZIP header");
}
h.headerLength += 2;
h.initOffsets();
}
- /**
- * Reads unsigned byte.
- *
- * @param in input stream to read.
- * @return unsigned byte value.
- * @throws java.io.IOException when error in file reading.
- */
- public static int readUByte(final InputStream in) throws IOException {
- int b = in.read();
- if (b == -1) {
- throw new EOFException();
- }
- return b;
- }
-
- /**
- * Reads unsigned integer in Intel byte order.
- *
- * @param in input stream to read.
- * @return unsigned integer value.
- * @throws java.io.IOException when error in file reading.
- */
- public static long readUInt(final InputStream in) throws IOException {
- long s = readUShort(in);
- return ((long) readUShort(in) << 16) | s;
- }
-
- /**
- * Reads unsigned short in Intel byte order.
- *
- * @param in input stream to read.
- * @return unsigned short value.
- * @throws java.io.IOException when error in file reading.
- */
- public static int readUShort(final InputStream in) throws IOException {
- int b = readUByte(in);
- return ((int) readUByte(in) << 8) | b;
- }
-
@Override
public final String toString() {
StringBuilder sb = new StringBuilder();
headerCrc.update(bb.array());
}
for (int i = 0; i < h.chunkCount; i++) {
- writeShort(out, h.chunks[i]);
+ DictZipFileUtils.writeShort(out, h.chunks[i]);
}
if (h.gzipFlag.get(FHCRC)) {
for (int i = 0; i < h.chunkCount; i++) {
out.write(0);
}
if (h.gzipFlag.get(FHCRC)) {
- writeShort(out, (int) headerCrc.getValue());
+ DictZipFileUtils.writeShort(out, (int) headerCrc.getValue());
}
}
/**
- * Writes integer in Intel byte order.
- *
- * @param out output stream to write.
- * @param i integer to write.
- * @throws java.io.IOException when error in file output.
- */
- public static void writeInt(final OutputStream out, final int i) throws IOException {
- writeShort(out, i & 0xffff);
- writeShort(out, (i >> 16) & 0xffff);
- }
-
- /**
- * Writes short integer in Intel byte order.
- *
- * @param out output stream to write.
- * @param s short integer to write.
- * @throws java.io.IOException when error in file output.
- */
- public static void writeShort(final OutputStream out, final int s) throws IOException {
- out.write(s & 0xff);
- out.write((s >> 8) & 0xff);
- }
-
- /**
* Offset getter.
*
* @param start total offset bytes.
import java.util.zip.Inflater;
import java.util.zip.InflaterInputStream;
+import static org.dict.zip.DictZipFileUtils.readUInt;
+
/**
* DictZipInputStream.
RandomAccessInputStream rain = (RandomAccessInputStream) in;
compLength = rain.getLength();
rain.seek(compLength - 8);
- crcVal = readUInt(rain);
- totalLength = readUInt(rain);
+ crcVal = readUInt(rain);
+ totalLength = readUInt(rain);
} else {
throw new IOException("Illegal type of InputStream.");
}
}
-
- private long readUInt(final InputStream in) throws IOException {
- return DictZipHeader.readUInt(in);
- }
}
import org.testng.annotations.Test;
+import java.io.File;
+
import static org.testng.Assert.*;
/**
- * Created by miurahr on 16/04/09.
+ * Created by Hiroshi Miura on 16/04/09.
*/
public class DictZipFileUtilsTest {
@Test
public void testIsFileBinaryEquals() throws Exception {
-
+ System.out.println("isFileBinaryEquals");
+ File firstFile = new File(this.getClass().getResource("/test_util.txt").getFile());
+ File secondFile = new File(this.getClass().getResource("/test_util1.txt").getFile());
+ assertTrue(DictZipFileUtils.isFileBinaryEquals(firstFile, secondFile));
}
@Test
- public void testIsFileBinaryEquals1() throws Exception {
+ public void testIsFileBinaryEquals_false() throws Exception {
+ System.out.println("isFileBinaryEquals_false");
+ File firstFile = new File(this.getClass().getResource("/test_util.txt").getFile());
+ File secondFile = new File(this.getClass().getResource("/test_util2.txt").getFile());
+ assertFalse(DictZipFileUtils.isFileBinaryEquals(firstFile, secondFile));
+ }
+ @Test
+ public void testIsFileBinaryEquals_range() throws Exception {
+ System.out.println("isFileBinaryEquals_range");
+ File firstFile = new File(this.getClass().getResource("/test_util.txt").getFile());
+ File secondFile = new File(this.getClass().getResource("/test_util2.txt").getFile());
+ assertTrue(DictZipFileUtils.isFileBinaryEquals(firstFile, secondFile, 10, 64));
}
+ @Test
+ public void testIsFileBinaryEquals_range_false() throws Exception {
+ System.out.println("isFileBinaryEquals_range_false");
+ File firstFile = new File(this.getClass().getResource("/test_util.txt").getFile());
+ File secondFile = new File(this.getClass().getResource("/test_util2.txt").getFile());
+ assertFalse(DictZipFileUtils.isFileBinaryEquals(firstFile, secondFile, 0, 64));
+ }
}
\ No newline at end of file
System.out.println("readHeader");
String dataFile = this.getClass().getResource("/test.dict.dz").getFile();
DictZipHeader result = DictZipHeader.readHeader(dataFile);
- assertEquals(toStringExpResult(), result.toString());
+ assertEquals(result.toString(), toStringExpResult());
}
/**
* @throws java.lang.Exception if file I/O error occurred.
*/
@Test
+ public void testReadHeader_type() throws Exception {
+ System.out.println("readHeader");
+ String dataFile = this.getClass().getResource("/test.dict.dz").getFile();
+ DictZipHeader result = DictZipHeader.readHeader(dataFile);
+ assertEquals(result.getType(), "dzip");
+ }
+
+ /**
+ * Test of readHeader method, of class DictZipHeader.
+ *
+ * @throws java.lang.Exception if file I/O error occurred.
+ */
+ @Test
+ public void testReadHeader_filename() throws Exception {
+ System.out.println("readHeader");
+ String dataFile = this.getClass().getResource("/test.dict.dz").getFile();
+ DictZipHeader result = DictZipHeader.readHeader(dataFile);
+ assertEquals(result.getFilename(), "results.dict");
+ }
+
+ /**
+ * Test of readHeader method, of class DictZipHeader.
+ *
+ * @throws java.lang.Exception if file I/O error occurred.
+ */
+ @Test
+ public void testReadHeader_chunkCount() throws Exception {
+ System.out.println("readHeader");
+ String dataFile = this.getClass().getResource("/test.dict.dz").getFile();
+ DictZipHeader result = DictZipHeader.readHeader(dataFile);
+ assertEquals(result.getChunkCount(), 7);
+ }
+
+ /**
+ * Test of readHeader method, of class DictZipHeader.
+ *
+ * @throws java.lang.Exception if file I/O error occurred.
+ */
+ @Test
public void testReadHeader_NonGZip() throws Exception {
System.out.println("readHeader / not dictzip file");
byte b[] = {3, 5, 2, 'r', 'g', 'e', 'f', 'd', 'e', 'w'};
DictZipHeader.writeHeader(header, outFile);
outFile.close();
String expectedHeader = this.getClass().getResource("/test.header.dz").getFile();
- assertTrue(TestUtils.isFileBinaryEquals(testFile, new File(expectedHeader), 6, 46));
+ assertTrue(DictZipFileUtils.isFileBinaryEquals(testFile, new File(expectedHeader), 6, 46));
testFile.deleteOnExit();
}
}
sb.append("\nChunk length = 58315");
sb.append("\nNumber of chunks = 7");
String expResult = sb.toString();
- assertEquals(expResult, header.toString());
+ assertEquals(header.toString(), expResult);
}
}
} catch (IOException e) {
r = 1;
}
- assertEquals(1, r, "DictZip instance can still be used after close is called");
+ assertEquals(r, 1, "DictZip instance can still be used after close is called");
} catch (IOException e) {
fail("an IO error occurred while trying to find the output file or creating DictZip constructor");
}
} catch (Exception ex) {
r = 1;
}
- assertEquals(1, r, "DictZip instance can still be used after finish is called");
+ assertEquals(r, 1, "DictZip instance can still be used after finish is called");
} catch (Exception ex) {
fail("an IO error occured while trying to find the output file or creating DictZip constructor");
}
RandomAccessInputStream instance = new RandomAccessInputStream(dataFile, "r");
int expResult = 136856;
int result = instance.available();
- assertEquals(expResult, result);
+ assertEquals(result, expResult);
}
/**
RandomAccessInputStream instance = new RandomAccessInputStream(dataFile, "r");
int expResult = 136856;
int result = instance.getLength();
- assertEquals(expResult, result);
+ assertEquals(result, expResult);
}
/**
RandomAccessInputStream instance = new RandomAccessInputStream(dataFile, "r");
int expResult = 0;
int result = instance.getPos();
- assertEquals(expResult, result);
+ assertEquals(result, expResult);
}
/**
RandomAccessInputStream instance = new RandomAccessInputStream(dataFile, "r");
int expResult = 31;
int result = instance.read();
- assertEquals(expResult, result);
+ assertEquals(result, expResult);
} catch (Exception ex) {
fail("get exception.");
}
RandomAccessInputStream instance = new RandomAccessInputStream(dataFile, "r");
int expResult = 256;
int result = instance.read(b, off, len);
- assertEquals(expResult, result);
+ assertEquals(result, expResult);
}
/**
RandomAccessInputStream instance = new RandomAccessInputStream(dataFile, "r");
long expResult = 100L;
long result = instance.skip(n);
- assertEquals(expResult, result);
+ assertEquals(result, expResult);
}
}