@Test
 public void shouldInstallProjectFacetAndCheckPositionIsBeforeValidator() throws Exception {
   // pre-conditions
   ProjectBuilderUtils.uninstallProjectBuilder(projectMonitor.getProject(), BUILDER_ID);
   Assert.assertFalse(
       "Wrong result",
       ProjectBuilderUtils.isProjectBuilderInstalled(projectMonitor.getProject(), BUILDER_ID));
   // pre-conditions: activating the validation builder
   projectMonitor.replaceDotProjectFileWith("dotProject.txt");
   assertThat(getCommandNames(projectMonitor.getProject()).length, equalTo(3));
   // operation
   ProjectBuilderUtils.installProjectBuilder(projectMonitor.getProject(), BUILDER_ID);
   // post-conditions
   final int p = ProjectBuilderUtils.getBuilderPosition(projectMonitor.getProject(), BUILDER_ID);
   assertThat(p, equalTo(2));
   final String[] names = getCommandNames(projectMonitor.getProject());
   assertThat(names.length, equalTo(4));
   for (int i = 0; i < names.length; i++) {
     assertThat(names[i], notNullValue());
   }
 }
 @Test
 public void shouldInstallAndUninstallProjectBuilderWithValidationBuilderAlreadyInstalled()
     throws Exception {
   // pre-conditions
   projectMonitor.replaceDotProjectFileWith("dotProject.txt");
   Assert.assertTrue(
       "Wrong result",
       ProjectBuilderUtils.isProjectBuilderInstalled(
           projectMonitor.getProject(), ProjectBuilderUtils.VALIDATOR_BUILDER_ID));
   ProjectBuilderUtils.uninstallProjectBuilder(projectMonitor.getProject(), BUILDER_ID);
   Assert.assertFalse(
       "Wrong result",
       ProjectBuilderUtils.isProjectBuilderInstalled(projectMonitor.getProject(), BUILDER_ID));
   Assert.assertTrue(
       "Wrong result",
       ProjectBuilderUtils.installProjectBuilder(projectMonitor.getProject(), BUILDER_ID));
   Assert.assertFalse(
       "Wrong result",
       ProjectBuilderUtils.installProjectBuilder(projectMonitor.getProject(), BUILDER_ID));
   Assert.assertTrue(
       "Wrong result",
       ProjectBuilderUtils.isProjectBuilderInstalled(projectMonitor.getProject(), BUILDER_ID));
   Assert.assertTrue(
       "Wrong result",
       ProjectBuilderUtils.isProjectBuilderInstalled(
           projectMonitor.getProject(), ProjectBuilderUtils.VALIDATOR_BUILDER_ID));
   Assert.assertTrue(
       "Wrong result",
       ProjectBuilderUtils.uninstallProjectBuilder(projectMonitor.getProject(), BUILDER_ID));
   Assert.assertFalse(
       "Wrong result",
       ProjectBuilderUtils.uninstallProjectBuilder(projectMonitor.getProject(), BUILDER_ID));
   Assert.assertFalse(
       "Wrong result",
       ProjectBuilderUtils.isProjectBuilderInstalled(projectMonitor.getProject(), BUILDER_ID));
 }