@Test
public void webSocketClosesAfterTimeElapsesFromStart() {

    // When watchdog is started,
    watchdog.start(webSocket, 100);
    // Act: the timeout elapses,
    ShadowLooper.idleMainLooper(101, TimeUnit.MILLISECONDS);
    // The WebSocket is closed.
    verify(webSocket).close(eq(1000), anyString());
}