@Test
public void testCreateEdgesExecutedTwice() {

  UUID edgeID = UUID.randomUUID();
  FactTypeStruct factTypeMock = mockFactType();
  ObjectTypeStruct objectTypeMock = mockObjectType();
  ObjectRecord objectSource = mockObject(objectTypeMock);
  ObjectRecord objectDestination = mockObject(objectTypeMock);
  Edge first = elementFactory.createEdge(new FactRecord()
          .setId(edgeID)
          .setTypeID(factTypeMock.getId())
          .setSourceObject(objectSource)
          .setDestinationObject(objectDestination),
          objectSource.getId());
  Edge second = elementFactory.createEdge(new FactRecord()
          .setId(edgeID)
          .setTypeID(factTypeMock.getId())
          .setSourceObject(objectSource)
          .setDestinationObject(objectDestination),
          objectSource.getId());
  assertSame(first, second);
}