@Test
public void testCustomSettingSource() {

    try {
        final MavenRequest mavenRequest = createMavenRequest(new SettingsSourceMock( "<settings/>" ) );
        final MavenEmbedder embedder = new MavenEmbedderWithRepoMock( mavenRequest );
        final MavenExecutionRequest request = embedder.getMavenExecutionRequest();
        assertNotNull( request );
        Assert.assertEquals( "<settings/>", readFileAsString( request.getUserSettingsFile() ).trim() );
    } catch ( MavenEmbedderException mee ) {
        fail( mee.getMessage() );
    }
}