}
Field field = Test.class.getDeclaredField("types");
//When
final ListCodec codec = factory.parseListField(createContext(field));
final List<Object> encoded = codec.encode(Arrays.<Object>asList(PropertyType.ID, PropertyType.EMBEDDED_ID));
final List<Object> decoded = codec.decode(Arrays.<Object>asList(2, 3, 4));
//Then
assertThat(encoded).containsExactly(0, 1);
assertThat(decoded).containsExactly(PropertyType.SIMPLE, PropertyType.LIST, PropertyType.SET);
}