@Test
public void shouldReturnCodecForObjectAnnotatedWithSingleType() {

    when(annotations.getAnnotation(BoundList.class)).thenReturn(boundList);
    when(delegate.create(annotations, List.class, context)).thenReturn(codec);
    when(boundList.type()).thenReturn((Class) Map.Entry.class);
    MapCodecFactory factory = new MapCodecFactory(delegate);
    Codec<Map> mapCodec = factory.create(annotations, Map.class, context);
    assertThat(mapCodec, is(not(nullValue())));
    verify(delegate).create(annotations, List.class, context);
    verify(annotations).getAnnotation(BoundList.class);
    verifyNoMoreInteractions(annotations, delegate, codec);
}