@Test public void getComponentInstanceWithNoHintWhenNoProgrammingRights() throws Exception { when(this.dab.hasProgrammingRights()).thenReturn(false); assertNull(this.mocker.getComponentUnderTest().getInstance(SomeRole.class)); verify(this.contextComponentManager, never()).getInstance(SomeRole.class); }
public <T> T getInstance(Type roleType) { T result = null; ComponentManager cm = getContextComponentManager(); if (cm != null) { try { result = cm.getInstance(roleType); } catch (ComponentLookupException e) { setError(e); } } return result; }
ComponentScriptService implements ScriptService { public <T> T getInstance(Type roleType) { T result = null; ComponentManager cm = getContextComponentManager(); if (cm != null) { try { result = cm.getInstance(roleType); } catch (ComponentLookupException e) { setError(e); } } return result; } }
ComponentScriptService implements ScriptService { public <T> T getInstance(Type roleType) { T result = null; ComponentManager cm = getContextComponentManager(); if (cm != null) { try { result = cm.getInstance(roleType); } catch (ComponentLookupException e) { setError(e); } } return result; }  }
ComponentScriptService implements ScriptService { public <T> T getInstance(Type roleType) { T result = null; ComponentManager cm = getContextComponentManager(); if (cm != null) { try { result = cm.getInstance(roleType); } catch (ComponentLookupException e) { setError(e); } } return result; }  @Deprecated ComponentManager getComponentManager(); ComponentManager getContextComponentManager(); ComponentManager getRootComponentManager(); ComponentManager getComponentManager(String namespace); T getInstance(Type roleType); T getInstance(Type roleType, String roleHint); Exception getLastError(); }
ComponentScriptService implements ScriptService { public <T> T getInstance(Type roleType) { T result = null; ComponentManager cm = getContextComponentManager(); if (cm != null) { try { result = cm.getInstance(roleType); } catch (ComponentLookupException e) { setError(e); } } return result; }  @Deprecated ComponentManager getComponentManager(); ComponentManager getContextComponentManager(); ComponentManager getRootComponentManager(); ComponentManager getComponentManager(String namespace); T getInstance(Type roleType); T getInstance(Type roleType, String roleHint); Exception getLastError();  }