### Question:
OasObjectPropertyLocation { public static String toPathString(OasObjectPropertyLocation location) { if (location == null) { return ""; } StringBuilder sb = new StringBuilder(); List<OasObjectProperty> path = location.getPath(); for (OasObjectProperty property : path) { sb.append(property.getName()).append('.'); } sb.deleteCharAt(sb.length() - 1); return sb.toString(); } private  OasObjectPropertyLocation(OasObjectProperty path); private  OasObjectPropertyLocation(List<OasObjectProperty> path); static OasObjectPropertyLocation root(); OasObjectPropertyLocation property(String propertyName, OasObjectType propertyType); OasObjectPropertyLocation property(String propertyName); List<OasObjectProperty> getPath(); @JsonIgnore OasObjectProperty getParent(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); static String toPathString(OasObjectPropertyLocation location);  }### Answer:
@Test public void toPathString() { assertEquals("$.foo.bar", OasObjectPropertyLocation.toPathString(OasObjectPropertyLocation.root().property("foo").property("bar"))); assertEquals("", OasObjectPropertyLocation.toPathString(null)); }