### Question:
ElementFactory { public Vertex getVertex(UUID id) { if (id == null) return null; try { return vertexCache.get(id); } catch (Exception ignored) { return null; } } private  ElementFactory(ActGraph owner); Set<Edge> createEdges(ObjectFactBindingEntity inBinding); Edge getEdge(UUID id); Vertex getVertex(UUID id); static Builder builder();  }### Answer:
@Test public void testGetVertexWithNullId() { assertNull(elementFactory.getVertex(null)); }
@Test public void testGetVertexNotExists() { assertNull(elementFactory.getVertex(UUID.randomUUID())); }
@Test public void testGetVertexNotCached() { UUID objectID = mockObject(UUID.randomUUID()); assertEquals(objectID, elementFactory.getVertex(objectID).id()); }
@Test public void testGetVertexCached() { UUID objectID = mockObject(UUID.randomUUID()); Vertex first = elementFactory.getVertex(objectID); Vertex second = elementFactory.getVertex(objectID); assertSame(first, second); }