ShutdownActor { public void shutdown(final ShutdownRequestMessage message) throws ReadValueException, ResolutionException, UpCounterCallbackExecutionException, IllegalUpCounterState { resolveUpCounter(message.getUpCounterName()).shutdown(message.getShutdownMode()); }  void shutdown(final ShutdownRequestMessage message); void forceShutdown(final ForceShutdownRequestMessage message);  }
@Test public void Should_performShutdownRequest() throws Exception { new ShutdownActor().shutdown(new ShutdownRequestMessage() { @Override public Object getShutdownMode() throws ReadValueException { return "the mode"; } @Override public Object getUpCounterName() throws ReadValueException { return "a upcounter"; } }); verify(upCounterMock).shutdown(eq("the mode")); }