### Question:
TinkerGraphUtil { static public <T> Optional<T> getProperty(Element container, String property, Class<T> type) { Optional<T> value = Optional.<T>empty(); if (container.getPropertyKeys().contains(property)) { value = Optional.<T>of(type.cast(container.getProperty(property))); } return value; } @Inject  TinkerGraphUtil(CurieUtil curieUtil);  TinkerGraphUtil(Graph graph, CurieUtil curieUtil); CurieUtil getCurieUtil(); Graph getGraph(); void setGraph(Graph graph); Element addElement(PropertyContainer container); void addPath(Iterable<PropertyContainer> path); Element addElement(Element element); void addGraph(Graph addition); Graph combineGraphs(Graph graph2); Graph resultToGraph(Result result); static Optional<T> getProperty(Element container, String property, Class<T> type); static Collection<T> getProperties(Element container, String property, Class<T> type); void project(Collection<String> projection);  }### Answer:
@Test public void primitivePropertiesAreReturned() { TinkerGraph graph = new TinkerGraph(); Vertex v = graph.addVertex(1); assertThat(TinkerGraphUtil.getProperty(v, "foo", String.class), is(Optional.<String>empty())); v.setProperty("foo", "bar"); assertThat(TinkerGraphUtil.getProperty(v, "foo", String.class), is(Optional.of("bar"))); }