@Before public void setUp() { when(settingsFacade.getPlatformSettings()).thenReturn(motechSettings); // required in constructor when(settingsFacade.getRawConfig("commcare-configs.json")) .thenReturn(new ByteArrayInputStream("{}".getBytes())); configService = new CommcareConfigServiceImpl( settingsFacade, commCareAPIHttpClient, eventRelay, commcareDataForwardingEndpointService); }
private void prepareSettingsFacade() { when(settingsFacade.getPlatformSettings()).thenReturn(platformSettings); when(platformSettings.getServerUrl()).thenReturn(SERVER_URL); when(platformSettings.getServerHost()).thenReturn(SERVER_URL); }