@Test
public void testToPrimaryKey() throws Exception {

    UUID id = UUID.randomUUID();
    PrimaryKey key = dao.toPrimaryKey(id);
    assertEquals(1, key.getComponents().size());
    for (KeyAttribute attr : key.getComponents()) {
        assertEquals("id", attr.getName());
        assertEquals(id.toString(), attr.getValue());
    }
}