### Question:
RequireJsPackageImpl implements IRequireJsPackage { @Override public String getModuleMainFile( String moduleId ) { return this.packages.get( moduleId ); } RequireJsPackageImpl( IPentahoWebPackage pentahoWebPackage, URI resourceRoot ); @Override String getName(); @Override String getVersion(); @Override String getWebRootPath(); @Override boolean preferGlobal(); @Override Map<String, String> getModules(); @Override String getModuleMainFile( String moduleId ); @Override Map<String, String> getDependencies(); @Override boolean hasScript( String name ); @Override URL getScriptResource( String name ); @Override Map<String, Map<String, ?>> getConfig(); @Override Map<String, Map<String, String>> getMap(); @Override Map<String, Map<String, ?>> getShim();  }### Answer:
@Test public void testGetModuleMainFile() { String expectedModuleName = "main"; String packageName = "SomePackageName"; when( mockPentahoWebPackage.getName() ).thenReturn( packageName ); List<String> packages = new ArrayList<>(); packages.add( packageName ); Map<String, Object> packagesJson = new HashMap<>(); packagesJson.put( "packages", packages ); when( mockPentahoWebPackage.getPackageJson() ).thenReturn( packagesJson ); this.requireJsPackage = new RequireJsPackageImpl( this.mockPentahoWebPackage, this.resourceRootUri ); String actualModuleName = this.requireJsPackage.getModuleMainFile( packageName ); assertEquals( "Module names should be equal", expectedModuleName, actualModuleName ); }