@Test public void send() throws Exception { TextMessage msg = new TextMessage("This is a test message"); String another = "another test object"; Assert.assertTrue(radio.send(another)); Assert.assertTrue(radio.send(msg)); Assert.assertEquals(msg, radio.getMessage(TextMessage.class)); Assert.assertEquals(another, radio.getMessage(String.class)); Assert.assertTrue(publisher.getReceivedMessages().get(0) instanceof RadioMessage); }
public boolean send(Object msg) { publisher.send(new RadioMessage(teamName, msg)); return true; }
Radio implements Subscriber { public boolean send(Object msg) { publisher.send(new RadioMessage(teamName, msg)); return true; } }
Radio implements Subscriber { public boolean send(Object msg) { publisher.send(new RadioMessage(teamName, msg)); return true; } Radio();  Radio(Publisher publisher, DroneInit drone, String teamName); }
Radio implements Subscriber { public boolean send(Object msg) { publisher.send(new RadioMessage(teamName, msg)); return true; } Radio();  Radio(Publisher publisher, DroneInit drone, String teamName); void start(); boolean send(Object msg); final Queue<Object> getMessages(); @Override void receive(Object o, MultipartCallbacks multipartCallbacks); final M getMessage(Class<M> messageClass); }
Radio implements Subscriber { public boolean send(Object msg) { publisher.send(new RadioMessage(teamName, msg)); return true; } Radio();  Radio(Publisher publisher, DroneInit drone, String teamName); void start(); boolean send(Object msg); final Queue<Object> getMessages(); @Override void receive(Object o, MultipartCallbacks multipartCallbacks); final M getMessage(Class<M> messageClass);  }