### Question:
PropertyPath { @Override public String toString() { return StringUtils.join( segments, "." ); } PropertyPath( String path );  PropertyPath( String[] segments );  PropertyPath(); protected  PropertyPath( PropertyPath parent, String shortName, Property uri ); protected  PropertyPath( List<String> segments, List<Property> properties ); @Override String toString(); String toHTMLString(); int size(); boolean beginsWith( Property p, ShortNameRenderer snr ); PropertyPath append( String shortName, String uri, ShortNameRenderer snr ); Property terminal(); PropertyPath shift(); boolean isEmpty(); static final Property STAR; }### Answer:
@Test public void testPropertyPathString() { assertEquals( "foo", new PropertyPath( "foo" ).toString() ); assertEquals( "foo.bar", new PropertyPath( "foo.bar" ).toString() ); assertEquals( "foo.bar.fubar", new PropertyPath( "foo.bar.fubar" ).toString() ); }
@Test public void testPropertyPathStringArray() { assertEquals( "foo", new PropertyPath( new String[] {"foo"} ).toString() ); assertEquals( "foo.bar", new PropertyPath( new String[] {"foo", "bar"} ).toString() ); assertEquals( "foo.bar.fubar", new PropertyPath( new String[] {"foo", "bar", "fubar"} ).toString() ); }
@Test public void testNullProperatyPath() { assertEquals( "", new PropertyPath().toString() ); }