public void setUp() { clockStub.setNow(System.currentTimeMillis()); SimpleStateFactory simpleStateFactory = new SimpleStateFactory(); simpleStateFactory.setClock(clockStub); simpleStateFactory.setTimeoutInMillisecs(TEST_TIMEOUT_IN_MILLISECONDS); simpleStateFactory.setFailureThreshold(FAILURE_THRESHOLD); underTest = new SimpleCircuitBreaker(); underTest.setStateFactory(simpleStateFactory); underTest.initialise(); mockCommand = mock(Command.class); command = (Command) mockCommand.proxy(); }