### Question:
RequireJsPackageConfigurationImpl implements IRequireJsPackageConfiguration { @Override public String getVersion() { String version = this.requireJsPackage.getVersion(); return version != null ? version : ""; } 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 getVersion() { IRequireJsPackage mockRequireJsPackage = getRequireJsPackageMock(); RequireJsPackageConfigurationImpl packageConfiguration = new RequireJsPackageConfigurationImpl( mockRequireJsPackage ); doReturn( version ).when( mockRequireJsPackage ).getVersion(); assertEquals( "Should return RequireJsPackage version", version, packageConfiguration.getVersion() ); doReturn( null ).when( mockRequireJsPackage ).getVersion(); assertEquals( "Should return empty version if RequireJsPackage version is null", "", packageConfiguration.getVersion() ); }