@Test
public void testGeneratedNodePrivateKeyThroughECKey() throws Exception {

    File outputFile = new File("database-test/nodeId.properties");
    //noinspection ResultOfMethodCallIgnored
    outputFile.delete();
    SystemProperties props = new SystemProperties();
    props.privateKey();
    assertTrue(outputFile.exists());
    String contents = FileCopyUtils.copyToString(new FileReader(outputFile));
    String[] lines = StringUtils.tokenizeToStringArray(contents, "\n");
    assertEquals(4, lines.length);
    assertTrue(lines[0].startsWith("#Generated NodeID."));
    assertTrue(lines[1].startsWith("#"));
    assertTrue(lines[2].startsWith("nodeIdPrivateKey="));
    assertEquals("nodeIdPrivateKey=".length() + 64, lines[2].length());
    assertTrue(lines[3].startsWith("nodeId="));
    assertEquals("nodeId=".length() + 128, lines[3].length());
}