### Question:
ComponentScriptService implements ScriptService { public ComponentManager getContextComponentManager() { return this.bridge.hasProgrammingRights() ? this.contextComponentManagerProvider.get() : null; }  @Deprecated ComponentManager getComponentManager(); ComponentManager getContextComponentManager(); ComponentManager getRootComponentManager(); ComponentManager getComponentManager(String namespace); T getInstance(Type roleType); T getInstance(Type roleType, String roleHint); Exception getLastError();  }### Answer:
@Test public void getContextComponentManagerWhenNoProgrammingRights() throws Exception { when(this.dab.hasProgrammingRights()).thenReturn(false); assertNull(this.mocker.getComponentUnderTest().getContextComponentManager()); }
@Test public void getContextComponentManagerWhenProgrammingRights() throws Exception { when(this.dab.hasProgrammingRights()).thenReturn(true); assertSame(this.contextComponentManager, this.mocker.getComponentUnderTest().getContextComponentManager()); }