assertEquals((Integer) firstNode.getId(), id);
}
@Test
public void testInsertPrimaryIndexKeyMultipleNodes() throws Exception {
Directory d = getDirectory();
Hive hive = getHive();
Integer key = new Integer(43);
for (Node node : hive.getNodes())
d.insertPrimaryIndexKey(node, key);
Collection<Integer> nodeIds = Transform.map(semaphoreToId(), d.getKeySemamphoresOfPrimaryIndexKey(key));
AssertUtils.assertUnique(nodeIds);
assertEquals(hive.getNodes().size(), nodeIds.size());
}