@Test
public void shouldNotBeAbleToAddDuplicateSegmentsDueToUniquenessConstraint() {

    Session session = driver.session();
    LocalDateTime timeStamp = LocalDateTime.now().truncatedTo(ChronoUnit.SECONDS);
    Neo4jImporter neo4jImporter = new Neo4jImporter(driver);
    // test uniqueness constraint by trying to add again
    String neuronsJsonPath = "src/test/resources/neuronList.json";
    List<Neuron> neuronList = NeuPrintMain.readNeuronsJson(neuronsJsonPath);
    neo4jImporter.addSegments("test", neuronList, timeStamp);
    int numberOfSegments2 = session.run("MATCH (n:Segment:test:`test-Segment`) RETURN count(n)").single().get(0).asInt();
    // 10 from neurons json + 2 from skeletons
    Assert.assertEquals(12, numberOfSegments2);
}