### Question:
DefaultStaticContentFetcherService implements StaticContentFetcherService { @Override public void refreshAll() { log.debug("refreshAll()"); for (StaticContent curEntry : contentMap.values()) { refreshFromLocation(curEntry); } } DefaultStaticContentFetcherService(RestTemplate restTemplate, List<StaticContent> contentObjects); @Override String getContent(String key); @Override void refreshAll(); @Override void refresh(String key); @Override void registerConsumer(StaticContentFetcherConsumer consumer); @Override void unregisterConsumer(StaticContentFetcherConsumer consumer);  }### Answer:
@Test public void refreshAll() throws URISyntaxException { DefaultStaticContentFetcherService service = new DefaultStaticContentFetcherService(restTemplate, Arrays.asList(VALID_CONTENT_1, VALID_CONTENT_2, VALID_CONTENT_3)); service.registerConsumer(consumer); assertBlankInitialContent(service); expectAllRestTemplateGetForObject(); consumer.notify(VALID_CONTENT_1.getId()); expectLastCall(); consumer.notify(VALID_CONTENT_2.getId()); expectLastCall().andThrow(new RuntimeException("boom")); consumer.notify(VALID_CONTENT_3.getId()); expectLastCall(); replay(restTemplate, consumer); service.refreshAll(); assertThat(service.getContent(VALID_URL1_ID), is(VALID_URL1_CONTENT)); assertThat(service.getContent(VALID_URL2_ID), is(VALID_URL2_CONTENT)); assertThat(service.getContent(VALID_URL3_ID), is(VALID_URL3_CONTENT)); verify(restTemplate, consumer); }