@Test
  public void testExecute_jibRequireVersion_fail() throws IOException {
    String targetImage = "simpleimage:maven" + System.nanoTime();

    try {
      Verifier verifier = new Verifier(simpleTestProject.getProjectRoot().toString());
      verifier.setSystemProperty("jib.requiredVersion", "[,1.0]");
      verifier.setSystemProperty("_TARGET_IMAGE", targetImage);
      verifier.executeGoals(Arrays.asList("package", "jib:dockerBuild"));
      Assert.fail();
    } catch (VerificationException ex) {
      MatcherAssert.assertThat(
          ex.getMessage(), CoreMatchers.containsString("but is required to be [,1.0]"));
    }
  }
Builds and runs jib:buildDocker on a project at {@code projectRoot} pushing to {@code
imageReference}.
jib-maven-plugin/src/integration-test/java/com/google/cloud/tools/jib/maven/BuildDockerMojoIntegrationTest.java