Field field = Test.class.getDeclaredField("maps");
//When
final MapCodec codec = factory.parseMapField(createContext(field));
Map<Object, Object> encoded = codec.encode(ImmutableMap.<Object, Object>of(PropertyType.COUNTER, ElementType.FIELD, PropertyType.ID, ElementType.METHOD));
Map<Object, Object> decoded = codec.decode(ImmutableMap.<Object, Object>of("LIST", "CONSTRUCTOR", "SET", "PARAMETER"));
//Then
assertThat(encoded.get("COUNTER")).isEqualTo("FIELD");
assertThat(encoded.get("ID")).isEqualTo("METHOD");