@Test public void testEncodesByteArray() throws Exception {
byte[] content = {12, 34, 56};
RequestTemplate template = new RequestTemplate();
encoder.encode(content, template);
assertEquals(template.body(), content);
}
@Test(expectedExceptions = EncodeException.class, expectedExceptionsMessageRegExp = ".* is not a type supported by this encoder.")
public void testRefusesToEncodeOtherTypes() throws Exception {
encoder.encode(new Date(), new RequestTemplate());