@Test
public void testPing() {

    final MockPingListener listener = new MockPingListener();
    final MockPing mockPing = new MockPing(null, listener, 3);
    mockPing.setCount(6);
    mockPing.run();
    Assert.assertEquals(mockPing.getCount(), listener.pingCount);
    Assert.assertEquals(mockPing.timeouts.length, listener.timeoutCount);
}