### Question:
CssSupportImpl implements CssSupport { @Override public void injectResource(String cssResourceName) { inject(getContentOf(cssResourceName)); } CssSupportImpl(JavascriptControl javascriptControl, AwaitControl awaitControl); @Override void inject(String cssText); @Override void injectResource(String cssResourceName);  }### Answer:
@Test public void shouldInjectResource() { when(javascriptControl.executeScript(anyString())).thenReturn(fluentJavascript); cssSupport.injectResource("/org/fluentlenium/core/css/dummy_resource.js"); verify(javascriptControl, times(1)).executeScript(startsWith("cssText = \"dummy: content\";")); verifyNoMoreInteractions(javascriptControl); }
@Test public void shouldThrowNPEIfResourceIsNotFound() { String cssResourceName = "/an/invalid/path.js"; assertThatThrownBy(() -> cssSupport.injectResource(cssResourceName)).isInstanceOf(NullPointerException.class); }