public void testMissingType() {
    try {

      IType type = fProject.findType("tests.apiusescan.coretestproject.IConstants");
      type.rename("IConstants1", true, null);
      IProject project = fProject.getProject();
      ExternalDependencyTestUtils.waitForBuild();

      IMarker[] markers =
          project.findMarkers(
              IApiMarkerConstants.API_USESCAN_PROBLEM_MARKER, false, IResource.DEPTH_ZERO);
      assertEquals(
          "No API Use Scan problem marker found for missing type IConstants", 1, markers.length);
      String typeName = markers[0].getAttribute(IApiMarkerConstants.API_USESCAN_TYPE, null);
      assertEquals(
          "Marker for missing type IConstants not found",
          "tests.apiusescan.coretestproject.IConstants",
          typeName);

      type = fProject.findType("tests.apiusescan.coretestproject.IConstants1");
      type.rename("IConstants", true, null);
      ExternalDependencyTestUtils.waitForBuild();
      markers =
          project.findMarkers(
              IApiMarkerConstants.API_USESCAN_PROBLEM_MARKER, false, IResource.DEPTH_ZERO);
      assertEquals(
          "API Use Scan problem marker for missing type IConstants did not clear",
          0,
          markers.length);
    } catch (JavaModelException e) {
      fail(e.getMessage());
    } catch (CoreException e) {
      fail(e.getMessage());
    }
  }