### Question:
Topic { public void unadvertise() { String unadvertiseId = "unadvertise:" + this.name + ":" + this.ros.nextId(); JsonObject call = Json.createObjectBuilder() .add(JRosbridge.FIELD_OP, JRosbridge.OP_CODE_UNADVERTISE) .add(JRosbridge.FIELD_ID, unadvertiseId) .add(JRosbridge.FIELD_TOPIC, this.name).build(); this.ros.send(call); this.isAdvertised = false; } Topic(Ros ros, String name, String type);  Topic(Ros ros, String name, String type,
			JRosbridge.CompressionType compression);  Topic(Ros ros, String name, String type, int throttleRate);  Topic(Ros ros, String name, String type,
			JRosbridge.CompressionType compression, int throttleRate); Ros getRos(); String getName(); String getType(); boolean isAdvertised(); boolean isSubscribed(); JRosbridge.CompressionType getCompression(); int getThrottleRate(); void subscribe(TopicCallback cb); void unsubscribe(); void advertise(); void unadvertise(); void publish(Message message);  }### Answer:
@Test public void testUnadvertise() { t1.unadvertise(); while (DummyHandler.latest == null) { Thread.yield(); } assertNotNull(DummyHandler.latest); assertEquals( "{\"op\":\"unadvertise\",\"id\":\"unadvertise:myTopic1:0\",\"topic\":\"myTopic1\"}", DummyHandler.latest.toString()); assertFalse(t1.isAdvertised()); assertFalse(t1.isSubscribed()); }