@Test public void componentLookupExceptionIsCaughtAndEmptyMapIsReturned() throws ComponentLookupException { doThrow(new ComponentLookupException("test")).when(this.componentManager).getInstanceMap( Vocabulary.class); Assert.assertTrue(this.mocker.getComponentUnderTest().get().isEmpty()); }
@Override public Map<String, Vocabulary> get() { try { return this.cm.get().getInstanceMap(Vocabulary.class); } catch (ComponentLookupException e) { return Collections.emptyMap(); } }
ContextVocabularyMapProvider implements Provider<Map<String, Vocabulary>> { @Override public Map<String, Vocabulary> get() { try { return this.cm.get().getInstanceMap(Vocabulary.class); } catch (ComponentLookupException e) { return Collections.emptyMap(); } } }
ContextVocabularyMapProvider implements Provider<Map<String, Vocabulary>> { @Override public Map<String, Vocabulary> get() { try { return this.cm.get().getInstanceMap(Vocabulary.class); } catch (ComponentLookupException e) { return Collections.emptyMap(); } }  }
ContextVocabularyMapProvider implements Provider<Map<String, Vocabulary>> { @Override public Map<String, Vocabulary> get() { try { return this.cm.get().getInstanceMap(Vocabulary.class); } catch (ComponentLookupException e) { return Collections.emptyMap(); } }  @Override Map<String, Vocabulary> get(); }
ContextVocabularyMapProvider implements Provider<Map<String, Vocabulary>> { @Override public Map<String, Vocabulary> get() { try { return this.cm.get().getInstanceMap(Vocabulary.class); } catch (ComponentLookupException e) { return Collections.emptyMap(); } }  @Override Map<String, Vocabulary> get();  }