@Test( expected = EnforcerRuleException.class )
public void shouldFailWithAParentWhichIsNotPartOfTheReactory()
    throws EnforcerRuleException, ExpressionEvaluationException
{

    MavenProject mp1 = createProjectParent();
    MavenProject wrongParentVerison = mock( MavenProject.class );
    when( wrongParentVerison.getGroupId() ).thenReturn( "org.apache" );
    when( wrongParentVerison.getArtifactId() ).thenReturn( "m1" );
    when( wrongParentVerison.getVersion() ).thenReturn( "1.0-SNAPSHOT" );
    when( wrongParentVerison.getId() ).thenReturn( "org.apache.enforcer:m1:jar:1.0-SNAPSHOT" );
    when( wrongParentVerison.getDependencies() ).thenReturn( Collections.<Dependency>emptyList() );
    MavenProject mp2 = createProjectChild2( wrongParentVerison );
    MavenProject mp3 = createProjectChild2( mp1 );
    List<MavenProject> theList = Arrays.asList( mp1, mp2, mp3 );
    setupSortedProjects( theList );
    rule.execute( helper );
    // intentionally no assertTrue() cause we expect getting an exception.
}