ReconnectionStrategy { public int getReconnectInterval() { return reconnectInterval; } ReconnectionStrategy(int maxAttempts, int reconnectInterval); int getNumberOfAttempts(); void setNumberOfAttempts(int numberOfAttempts); int getReconnectInterval(); void processAttempts(); int getMaxAttempts();  }
@Test public void testReconnectionInterval() { ReconnectionStrategy strategy = new ReconnectionStrategy(5, 1000); assertTrue("reconnect interval", strategy.getReconnectInterval() == 1000); }
@Test public void testMaxInterval() { ReconnectionStrategy strategy = new ReconnectionStrategy(5, 60000); assertTrue(strategy.getReconnectInterval() == 30000); }