    @Test
    public void testErrnoException() {

        final MockPingListener listener = new MockPingListener();
        final ErrnoException fail = new ErrnoException("sendto()", 1);
        new MockPing(null, listener) {
            @Override
            protected int sendto(final FileDescriptor fd, final ByteBuffer byteBuffer) throws ErrnoException {
                throw fail;
            }
        }.run();
        Assert.assertEquals(fail, listener.exception);
    }