### Question:
MessageProcessorEndpointHttp extends MessageProcessorEndpoint implements OnModeChangedPreferenceChangedListener { @Override public void checkConfigurationComplete() throws ConfigurationIncompleteException { if (this.httpEndpoint==null) { throw new ConfigurationIncompleteException("HTTP Endpoint is missing"); } } MessageProcessorEndpointHttp(MessageProcessor messageProcessor, Parser parser, Preferences preferences, Scheduler scheduler, Context applicationContext); @Override void onCreateFromProcessor(); @Override void onDestroy(); @Override void onAttachAfterModeChanged(); @Override void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key); @Override void checkConfigurationComplete(); static final int MODE_ID; static final String USERAGENT; }### Answer:
@Test(expected = ConfigurationIncompleteException.class) public void EndpointCorrectlyFailsOnInvalidUrl() throws ConfigurationIncompleteException { String[] urls = {"htt: for (String url : urls) { when(testPreferences.getUrl()).thenReturn(url); messageProcessorEndpointHttp = new MessageProcessorEndpointHttp(messageProcessor, parser, testPreferences, scheduler, null); messageProcessorEndpointHttp.checkConfigurationComplete(); } }