HeartbeatDelegate extends Delegate { public HeartbeatMode getHeartbeatMode() { return heartbeatMode; } HeartbeatDelegate(); HeartbeatMode getHeartbeatMode(); void setHeartbeatMode(HeartbeatMode heartbeatMode); @Override void applyDelegate(Config config);  }
@Test public void testGetHeartbeatMode() { args = new String[2]; args[0] = "-heartbeat_mode"; args[1] = "PEER_ALLOWED_TO_SEND"; delegate.setHeartbeatMode(null); jcommander.parse(args); assertTrue(delegate.getHeartbeatMode() == HeartbeatMode.PEER_ALLOWED_TO_SEND); }