}
Field field = Test.class.getDeclaredField("types");
//When
final SetCodec codec = factory.parseSetField(createContext(field));
final Set<Object> encoded = codec.encode(Sets.newSet(PropertyType.ID, PropertyType.EMBEDDED_ID));
final Set<Object> decoded = codec.decode(Sets.newSet(2, 3, 4));
//Then
assertThat(encoded).containsOnly(0, 1);
assertThat(decoded).containsOnly(PropertyType.SIMPLE, PropertyType.LIST, PropertyType.SET);
}