### Question:
FactEdge implements Edge { public static Builder builder() { return new Builder(); } private  FactEdge(ActGraph graph,
                   FactRecord fact,
                   FactTypeStruct type,
                   Vertex inVertex,
                   Vertex outVertex,
                   List<PropertyEntry<?>> properties); @Override Iterator<Vertex> vertices(Direction direction); @Override Object id(); @Override String label(); @Override Graph graph(); @Override Iterator<Property<V>> properties(String... propertyKeys); @Override Property<V> property(String key, V value); @Override void remove(); FactRecord getFactRecord(); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode(); static Builder builder();  }### Answer:
@Test public void testCreateEdgeWithoutGraph() { assertThrows(RuntimeException.class, () -> { FactEdge.builder() .setFactRecord(new FactRecord()) .setFactType(FactTypeStruct.builder().build()) .setInVertex(mock(Vertex.class)) .setOutVertex(mock(Vertex.class)) .build(); }); }
@Test public void testCreateEdgeWithoutFact() { assertThrows(RuntimeException.class, () -> FactEdge.builder() .setGraph(actGraph) .setFactType(FactTypeStruct.builder().build()) .setInVertex(mock(Vertex.class)) .setOutVertex(mock(Vertex.class)) .build()); }
@Test public void testCreateEdgeWithoutFactType() { assertThrows(RuntimeException.class, () -> FactEdge.builder() .setGraph(actGraph) .setFactRecord(new FactRecord()) .setInVertex(mock(Vertex.class)) .setOutVertex(mock(Vertex.class)) .build()); }
@Test public void testCreateEdgeWithoutInVertex() { assertThrows(RuntimeException.class, () -> FactEdge.builder() .setGraph(actGraph) .setFactRecord(new FactRecord()) .setFactType(FactTypeStruct.builder().build()) .setOutVertex(mock(Vertex.class)) .build()); }
@Test public void testCreateEdgeWithoutOutVertex() { assertThrows(RuntimeException.class, () -> FactEdge.builder() .setGraph(actGraph) .setFactRecord(new FactRecord()) .setFactType(FactTypeStruct.builder().build()) .setInVertex(mock(Vertex.class)) .build()); }