@Test
public void removeOldActivatorIfExistsTest() {

    org.uberfire.java.nio.file.Path existingActivatorPathMock = mock(org.uberfire.java.nio.file.Path.class);
    service.removeOldActivatorIfExists(existingActivatorPathMock, kieModuleMock);
    verify(ioServiceMock, times(2)).deleteIfExists(any());
    reset(ioServiceMock);
    when(kieModuleServiceMock.resolvePackages(any(KieModule.class))).thenReturn(new HashSet<>());
    service.removeOldActivatorIfExists(existingActivatorPathMock, kieModuleMock);
    verify(ioServiceMock, times(1)).deleteIfExists(eq(existingActivatorPathMock));
}