@Test
public void buildCompoundPKTest() throws MongoValidationException {

    TableMetadataBuilder tableMetaBuilder = new TableMetadataBuilder(DB_NAME, COLLECTION_NAME, CLUSTER_NAME);
    tableMetaBuilder.addColumn(ROW_NAME, VARCHAR_COLUMN_TYPE).addColumn(OTHER_ROW_NAME, INT_COLUMN_TYPE);
    tableMetaBuilder.withPartitionKey(ROW_NAME);
    tableMetaBuilder.withClusterKey(OTHER_ROW_NAME);
    TableMetadata tableMetadata = tableMetaBuilder.build();
    Row row = new Row();
    row.addCell(ROW_NAME, new Cell(CELL_VALUE));
    row.addCell(OTHER_ROW_NAME, new Cell(INTEGER_CELL_VALUE));
    DBObject pk = (DBObject) StorageUtils.buildPK(tableMetadata, row);
    assertTrue("The primary key must contain " + ROW_NAME, pk.containsField(ROW_NAME));
    assertTrue("The primary key must contain " + OTHER_ROW_NAME, pk.containsField(OTHER_ROW_NAME));
    assertEquals("The string value is not the expected", CELL_VALUE, pk.get(ROW_NAME));
    assertEquals("The integer value is not the expected", INTEGER_CELL_VALUE, pk.get(OTHER_ROW_NAME));
}