### Question:
JibPluginConfiguration extends AbstractMojo { boolean isContainerizable() { String moduleSpecification = getProperty(PropertyNames.CONTAINERIZE); if (project == null || Strings.isNullOrEmpty(moduleSpecification)) { return true; } if (moduleSpecification.equals(project.getGroupId() + ":" + project.getArtifactId()) || moduleSpecification.equals(":" + project.getArtifactId())) { return true; } if (moduleSpecification.contains(":")) { return false; } try { Path projectBase = project.getBasedir().toPath(); return projectBase.endsWith(moduleSpecification); } catch (InvalidPathException ex) { return false; } }  String getContainerizingMode();  }### Answer:
@Test public void testIsContainerizable_noProperty() { Properties projectProperties = project.getProperties(); projectProperties.remove("jib.containerize"); Assert.assertTrue(testPluginConfiguration.isContainerizable()); projectProperties.setProperty("jib.containerize", ""); Assert.assertTrue(testPluginConfiguration.isContainerizable()); }
@Test public void testIsContainerizable_artifactId() { project.setGroupId("group"); project.setArtifactId("artifact"); Properties projectProperties = project.getProperties(); projectProperties.setProperty("jib.containerize", ":artifact"); Assert.assertTrue(testPluginConfiguration.isContainerizable()); projectProperties.setProperty("jib.containerize", ":artifact2"); Assert.assertFalse(testPluginConfiguration.isContainerizable()); }
@Test public void testIsContainerizable_groupAndArtifactId() { project.setGroupId("group"); project.setArtifactId("artifact"); Properties projectProperties = project.getProperties(); projectProperties.setProperty("jib.containerize", "group:artifact"); Assert.assertTrue(testPluginConfiguration.isContainerizable()); projectProperties.setProperty("jib.containerize", "group:artifact2"); Assert.assertFalse(testPluginConfiguration.isContainerizable()); }
@Test public void testIsContainerizable_directory() { project.setGroupId("group"); project.setArtifactId("artifact"); Properties projectProperties = project.getProperties(); projectProperties.setProperty("jib.containerize", "project"); Assert.assertTrue(testPluginConfiguration.isContainerizable()); projectProperties.setProperty("jib.containerize", "project2"); Assert.assertFalse(testPluginConfiguration.isContainerizable()); }