SummaryModel { @VisibleForTesting boolean samplePresentInSummaries(@NotNull String sample) { return sampleToSummaryMap.containsKey(sample); } SummaryModel(@NotNull final Map<String, String> sampleToSummaryMap); @NotNull String findSummaryForSample(@NotNull String sample);  }
@Test public void sampleArePresentInSummaryModel() { Map<String, String> summaryToSampleMap = Maps.newHashMap(); summaryToSampleMap.put("sample", "this is a test summary"); SummaryModel summaryModel = new SummaryModel(summaryToSampleMap); assertTrue(summaryModel.samplePresentInSummaries("sample")); assertFalse(summaryModel.samplePresentInSummaries("sample2")); }