OfframpServiceV2 implements OfframpService { @VisibleForTesting void sendRebalance(Set<Integer> assignment) { sendEvent(new Rebalance(assignment)); }  @Override void run(); @Override void close(); @Override void onEvent(String event);  }
@Test public void sendRebalance() throws Exception { Set<Integer> assignment = singleton(0); doNothing().when(underTest).sendEvent(any()); underTest.sendRebalance(assignment); verify(underTest).sendEvent(new Rebalance(assignment)); }