@Test
public void testAddTargetWithMissingArtifactIdInTargetDefinition() throws MojoExecutionException {

    Xpp3Dom dom = createGavConfiguration("myGroupId", null, "myVersion");
    MavenSession session = setupMockSession();
    TargetPlatformConfiguration configuration = new TargetPlatformConfiguration();
    try {
        configurationReader.addTargetArtifact(configuration, session, null, dom);
        fail();
    } catch (BuildFailureException e) {
        assertTrue(e.getMessage().contains("The target artifact configuration is invalid"));
    }
}