@Test
public void testAddNodeShouldAssignId() {

  DataCenterSpec dc = new DataCenterSpec();
  for (int i = 0; i < 5; i++) {
    NodeSpec node = dc.addNode().build();
    assertThat(node.getId()).isEqualTo((long) i);
    assertThat(node.getDataCenter()).isEqualTo(dc);
    assertThat(node.getParent()).isEqualTo(Optional.of(dc));
    assertThat(dc.getNodes()).contains(node);
  }
  assertThat(dc.getNodes()).hasSize(5);
}