@Before public void setUp() { when(addressService.getFrontendAddress()).thenReturn(to); when(messageSystem.getAddressService()).thenReturn(addressService); when(mechanicService.getAddress()).thenReturn(from); when(mechanicService.getMessageSystem()).thenReturn(messageSystem); }