@Test
public void testEncode() throws Exception {
String[] testStr = {"abc", "tdd", "agile", "java"};
for (String str: testStr) {
byte[] encoded = new StringEncoder().encode(str);
String decoded = new StringDecoder().decode(new ByteArrayInputStream(encoded));
Assert.assertEquals(str, decoded);
}
}