@@ -0,0 +1,2207 @@
+package rxbroadcast;%0A%0Aimport org.junit.After;%0Aimport org.junit.Rule;%0Aimport org.junit.Test;%0Aimport org.junit.rules.Timeout;%0Aimport rx.observers.TestSubscriber;%0A%0Aimport java.io.Closeable;%0Aimport java.io.IOException;%0Aimport java.net.DatagramSocket;%0Aimport java.net.SocketException;%0Aimport java.util.LinkedList;%0Aimport java.util.List;%0Aimport java.util.function.Supplier;%0A%0A@SuppressWarnings(%7B%22checkstyle:MagicNumber%22%7D)%0Apublic final class UdpBroadcastOnSubscribeTest %7B%0A    private final List%3CCloseable%3E resources = new LinkedList%3C%3E();%0A%0A    private final Supplier%3CDatagramSocket%3E datagramSocketSupplier = () -%3E %7B%0A        try %7B%0A            final DatagramSocket socket = new DatagramSocket();%0A            resources.add(socket);%0A            return socket;%0A        %7D catch (final SocketException e) %7B%0A            throw new RuntimeException(e);%0A        %7D%0A    %7D;%0A%0A    @Rule%0A    public final Timeout timeout = Timeout.seconds(1);%0A%0A    @After%0A    public final void tearDown() %7B%0A        resources.forEach(closeable -%3E %7B%0A            try %7B%0A                closeable.close();%0A            %7D catch (final IOException e) %7B%0A                // ???%0A            %7D%0A        %7D);%0A    %7D%0A%0A    @Test%0A    public final void unsubscribeDoesBreakCall() throws SocketException %7B%0A        final TestSubscriber%3CObject%3E subscriber = new TestSubscriber%3C%3E();%0A        final UdpBroadcastOnSubscribe%3CObject%3E onSubscribe = new UdpBroadcastOnSubscribe%3C%3E(%0A            datagramSocketSupplier.get(), new ObjectSerializer%3C%3E(), new NoOrder%3C%3E());%0A%0A        subscriber.unsubscribe();%0A        onSubscribe.call(subscriber);%0A%0A        subscriber.assertNoErrors();%0A        subscriber.assertNoValues();%0A        subscriber.assertNotCompleted();%0A    %7D%0A%0A    @Test%0A    public final void closedReadSocketErrorDoesPropagateToSubscriber() throws SocketException %7B%0A        final TestSubscriber%3CObject%3E subscriber = new TestSubscriber%3C%3E();%0A        final DatagramSocket socket = new DatagramSocket();%0A        final UdpBroadcastOnSubscribe%3CObject%3E onSubscribe = new UdpBroadcastOnSubscribe%3C%3E(%0A            socket, new ObjectSerializer%3C%3E(), new NoOrder%3C%3E());%0A%0A        socket.close();%0A        onSubscribe.call(subscriber);%0A%0A        subscriber.assertError(IOException.class);%0A    %7D%0A%7D%0A

Add test cases for UdpBroadcastOnSubscribe