@Test public void testCreateSocketReturnsNewInstance() throws Exception { Transmitter transmitter = new Transmitter(); MulticastSocket socket1 = transmitter.createSocket(); MulticastSocket socket2 = transmitter.createSocket(); Assert.assertNotNull(socket1); Assert.assertNotNull(socket2); Assert.assertNotSame(socket1, socket2); }
protected MulticastSocket createSocket() throws IOException { return new MulticastSocket(); }
Transmitter { protected MulticastSocket createSocket() throws IOException { return new MulticastSocket(); } }
Transmitter { protected MulticastSocket createSocket() throws IOException { return new MulticastSocket(); } Transmitter();  Transmitter(int port);  Transmitter(String multicastAddress, int port); }
Transmitter { protected MulticastSocket createSocket() throws IOException { return new MulticastSocket(); } Transmitter();  Transmitter(int port);  Transmitter(String multicastAddress, int port); void transmit(Intent intent); }
Transmitter { protected MulticastSocket createSocket() throws IOException { return new MulticastSocket(); } Transmitter();  Transmitter(int port);  Transmitter(String multicastAddress, int port); void transmit(Intent intent);  }