### Question:
ServiceClassifier { @Override public String toString() { StringBuilder buff = new StringBuilder(zone); if (!zone.equalsIgnoreCase("**")) { buff.append("/").append(region); if (!region.equalsIgnoreCase("**")) { buff.append("/").append(group); if (!group.equalsIgnoreCase("**")) { buff.append("/").append(name); } } } return buff.toString(); }  String getRegion(); ServiceClassifier setRegion(String region); String getZone(); ServiceClassifier setZone(String zone); String getGroup(); ServiceClassifier setGroup(String group); String getName(); ServiceClassifier setName(String name); String getRegistrationPath(); @Override String toString();  }### Answer:
@Test public void testToString() { ServiceClassifier sc = new ServiceClassifier() .setZone("zone") .setRegion("region") .setGroup("flavor") .setName("name"); Assert.assertEquals(sc.toString(), "zone/region/flavor/name"); sc.setName("*"); Assert.assertEquals(sc.toString(), "zone/region/flavor/*"); sc.setGroup("**"); Assert.assertEquals(sc.toString(), "zone/region/**"); sc.setRegion("**"); Assert.assertEquals(sc.toString(), "zone/**"); }