### Question:
Uploader { protected boolean areAllUploadersInitialized() { return allUploadersInitalized; } Uploader(Context context, NightscoutPreferences preferences); boolean upload(DownloadResults downloadResults, int numRecords); boolean upload(DownloadResults downloadResults);  }### Answer:
@Test public void initializeShouldFailOnInvalidMongoUri() throws Exception { TestPreferences prefs = new TestPreferences(); prefs.setMongoUploadEnabled(true); prefs.setMongoClientUri("http: Uploader uploader = new Uploader(getContext(), prefs); assertThat(uploader.areAllUploadersInitialized(), is(false)); }