@Test
public void validateMappingInfo() {
Field field = ReflectionUtils.findField(Thing.class, "id");
CassandraPersistentProperty property = new BasicCassandraPersistentProperty(field, null, thing, SIMPLE_TYPE_HOLDER);
assertTrue(property.isIdProperty());
assertTrue(property.isCompositePrimaryKey());
List<CqlIdentifier> expectedColumnNames = Arrays.asList(new CqlIdentifier[] { cqlId("z"), cqlId("a") });
assertTrue(expectedColumnNames.equals(property.getColumnNames()));
List<CqlIdentifier> actualColumnNames = new ArrayList<CqlIdentifier>();
List<CassandraPersistentProperty> properties = property.getCompositePrimaryKeyProperties();
for (CassandraPersistentProperty p : properties) {
actualColumnNames.addAll(p.getColumnNames());
}
assertTrue(expectedColumnNames.equals(actualColumnNames));