### Question:
MavenPluginUtil { public static boolean isParentProject(MavenProject project){ return PARENT_PROJECT_PACKAGING.equals(project.getPackaging()); }  static boolean isParentProject(MavenProject project);  }### Answer:
@Test public void isParentMavenProject() { MavenProject mavenProject = mock(MavenProject.class); given(mavenProject.getPackaging()).willReturn("pom"); assertEquals(mavenProject.getPackaging(), "pom"); MavenPluginUtil mavenPluginUtil = new MavenPluginUtil(); assertTrue(mavenPluginUtil.isParentProject(mavenProject)); }
@Test public void notParentMavenProject() { MavenProject mavenProject = mock(MavenProject.class); given(mavenProject.getPackaging()).willReturn("jar"); assertEquals(mavenProject.getPackaging(), "jar"); MavenPluginUtil mavenPluginUtil = new MavenPluginUtil(); assertFalse(mavenPluginUtil.isParentProject(mavenProject)); }