@Test public void itShouldEncodeListOfStringAndInteger() throws Exception { encoder.encode(asList("a", 1)); assertThat(out.toString(), is("l1:ai1ee")); }
@Test public void itShouldBeApplicableForNull() throws Exception { assertThat(encoder.isApplicable(null), is(false)); }
@Test public void itShouldEncodeEmptyList() throws Exception { encoder.encode(emptyList()); assertThat(out.toString(), is("le")); }
@Test public void itShouldBeApplicableForLists() throws Exception { assertThat(encoder.isApplicable(emptyList()), is(true)); }