@Test
public void testGenerateNodeIdNoExisting() throws Exception {

    final String EXPECTED_NODE_ID = "100";
    DefaultNodeIdCreator generator = new DefaultNodeIdCreator(new MockParameterService(), new MockNodeService(), SecurityServiceFactory.create());
    Node node = new Node();
    node.setExternalId("100");
    String selectedNodeId = generator.generateNodeId(node, null, null);
    assertEquals(EXPECTED_NODE_ID, selectedNodeId);
}