@Test
  public void shouldIgnoreDerivedResourcesEvents() throws CoreException {
    when(resource.isDerived()).thenReturn(true);

    assertFalse(deltaVisitor.visit(resourceDelta(CONTENT)));
    assertFalse(deltaVisitor.savedResourceFound());
  }
  @Test
  public void shouldIgnoreMarkerOnlyChanges() throws CoreException {
    when(resource.getType()).thenReturn(IResource.FILE);
    when(resource.isDerived()).thenReturn(false);

    assertFalse(deltaVisitor.visit(resourceDelta(MARKERS)));
    assertFalse(deltaVisitor.savedResourceFound());
  }
  @Test
  public void shouldKeepLookingIfResourceIsNotAFile() throws CoreException {
    when(resource.isDerived()).thenReturn(false);
    when(resource.getType()).thenReturn(IResource.FOLDER);

    assertTrue(deltaVisitor.visit(resourceDelta(CONTENT)));
    assertFalse(deltaVisitor.savedResourceFound());
  }
  @Test
  public void shouldDetectNonDerivedResources() throws CoreException {
    when(resource.getType()).thenReturn(IResource.FILE);
    when(resource.isDerived()).thenReturn(false);

    assertFalse(deltaVisitor.visit(resourceDelta(CONTENT)));
    assertTrue(deltaVisitor.savedResourceFound());
  }