### Question:
DefaultInstallationService implements InstallationService, Initializable { public List<String> getJavaVersionInfo( Installation installation ) throws InstallationException { if ( installation == null ) { return getDefaultJavaVersionInfo(); } if ( StringUtils.isEmpty( installation.getVarValue() ) ) { return getDefaultJavaVersionInfo(); } try { return getJavaVersionInfo( installation.getVarValue() ); } catch ( Exception e ) { throw new InstallationException( e.getMessage(), e ); } }  void initialize(); Installation add( Installation installation ); Installation add( Installation installation, boolean automaticProfile ); void delete( Installation installation ); @SuppressWarnings( "unchecked" ) List<Installation> getAllInstallations(); Installation getInstallation( int installationId ); Installation getInstallation( String installationName ); void update( Installation installation ); ExecutorConfigurator getExecutorConfigurator( String type ); String getEnvVar( String type ); List<String> getDefaultJavaVersionInfo(); List<String> getJavaVersionInfo( Installation installation ); List<String> getExecutorVersionInfo( String path, ExecutorConfigurator executorConfigurator,
                                                Profile profile );  }### Answer:
@Test public void testGetJavaVersionInfo() throws Exception { InstallationService installationService = (InstallationService) lookup( InstallationService.ROLE, "default" ); String javaHome = System.getenv( "JAVA_HOME" ); if ( StringUtils.isEmpty( javaHome ) ) { javaHome = System.getProperty( "java.home" ); } Installation installation = new Installation(); installation.setName( "test" ); installation.setType( InstallationService.JDK_TYPE ); installation.setVarValue( javaHome ); List<String> infos = installationService.getJavaVersionInfo( installation ); assertNotNull( infos ); }