### Question:
DefaultBuildAgentMavenBuilderHelper implements BuildAgentMavenBuilderHelper, Contextualizable, Initializable { public MavenProject getMavenProject( ContinuumProjectBuildingResult result, File file ) { MavenProject project; try { Settings settings = getSettings(); if ( log.isDebugEnabled() ) { writeSettings( settings ); } ProfileManager profileManager = new DefaultProfileManager( container, settings ); project = projectBuilder.build( file, getRepository( settings ), profileManager, false ); if ( log.isDebugEnabled() ) { writePom( project ); writeActiveProfileStatement( project ); } } catch ( ProjectBuildingException e ) { StringBuffer messages = new StringBuffer(); Throwable cause = e.getCause(); if ( cause != null ) { while ( ( cause.getCause() != null ) && ( cause instanceof ProjectBuildingException ) ) { cause = cause.getCause(); } } if ( e instanceof InvalidProjectModelException ) { InvalidProjectModelException ex = (InvalidProjectModelException) e; ModelValidationResult validationResult = ex.getValidationResult(); if ( validationResult != null && validationResult.getMessageCount() > 0 ) { for ( String valmsg : (List<String>) validationResult.getMessages() ) { result.addError( ContinuumProjectBuildingResult.ERROR_VALIDATION, valmsg ); messages.append( valmsg ); messages.append( "\n" ); } } } if ( cause instanceof ArtifactNotFoundException ) { result.addError( ContinuumProjectBuildingResult.ERROR_ARTIFACT_NOT_FOUND, ( cause ).toString() ); return null; } result.addError( ContinuumProjectBuildingResult.ERROR_PROJECT_BUILDING, e.getMessage() ); String msg = "Cannot build maven project from " + file + " (" + e.getMessage() + ").\n" + messages; log.error( msg ); return null; } catch ( Exception e ) { result.addError( ContinuumProjectBuildingResult.ERROR_PROJECT_BUILDING, e.getMessage() ); String msg = "Cannot build maven project from " + file + " (" + e.getMessage() + ")."; log.error( msg ); return null; } Scm scm = project.getScm(); if ( scm == null ) { result.addError( ContinuumProjectBuildingResult.ERROR_MISSING_SCM, getProjectName( project ) ); log.error( "Missing 'scm' element in the " + getProjectName( project ) + " POM." ); return null; } String url = scm.getConnection(); if ( StringUtils.isEmpty( url ) ) { result.addError( ContinuumProjectBuildingResult.ERROR_MISSING_SCM_CONNECTION, getProjectName( project ) ); log.error( "Missing 'connection' element in the 'scm' element in the " + getProjectName( project ) + " POM." ); return null; } return project; }  MavenProject getMavenProject( ContinuumProjectBuildingResult result, File file ); void mapMetadataToProject( ContinuumProjectBuildingResult result, File metadata, Project continuumProject ); void mapMavenProjectToContinuumProject( ContinuumProjectBuildingResult result, MavenProject mavenProject,
                                                   Project continuumProject, boolean groupPom ); String getProjectName( MavenProject project ); void contextualize( Context context ); void initialize();  }### Answer:
@Test public void testGetMavenProjectWithMaven3Metadata() throws Exception { File pomFile = getTestFile( "src/test/test-projects/maven3-metadata/pom.xml" ); MavenProject project = helper.getMavenProject( new ContinuumProjectBuildingResult(), pomFile ); assertNotNull( project ); }