### Question:
RequireJsPackageConfigurationImpl implements IRequireJsPackageConfiguration { @Override public URL getScriptResource( final String name ) { return this.requireJsPackage.getScriptResource( name ); } RequireJsPackageConfigurationImpl( IRequireJsPackage requireJsPackage ); @Override void processRequireJsPackage(); @Override void processDependencies( BiFunction<String, String, IRequireJsPackageConfiguration> dependencyResolver ); @Override Map<String, Object> getRequireConfig( List<IRequireJsPackageConfigurationPlugin> plugins ); @Override Map<String, String> getBaseModuleIdsMapping(); @Override Map<String, String> getModuleIdsMapping(); @Override IRequireJsPackage getRequireJsPackage(); @Override String getName(); @Override String getVersion(); @Override Map<String, String> getDependencies(); @Override boolean hasScript( final String name ); @Override URL getScriptResource( final String name ); @Override String getWebRootPath();  }### Answer:
@Test public void getScriptResource() throws MalformedURLException { IRequireJsPackage mockRequireJsPackage = getRequireJsPackageMock(); RequireJsPackageConfigurationImpl packageConfiguration = new RequireJsPackageConfigurationImpl( mockRequireJsPackage ); doReturn( null ).when( mockRequireJsPackage ).getScriptResource( anyString() ); URL toBeReturned = new URL( "file: doReturn( toBeReturned ).when( mockRequireJsPackage ).getScriptResource( "preconfig" ); assertSame( "Should return RequireJsPackage getScriptResource result", toBeReturned, packageConfiguration.getScriptResource( "preconfig" ) ); assertEquals( "Should return RequireJsPackage getScriptResource result", null, packageConfiguration.getScriptResource( "postconfig" ) ); }