ListProvidersScanner implements ArtifactInstaller { @Override public void uninstall(File artifact) { logger.info("Removing list provider {}", artifact.getAbsolutePath()); removeResourceListProvider(artifact); }  void setListProvidersService(ListProvidersService listProvidersService); @Override boolean canHandle(File artifact); @Override void install(File artifact); @Override void update(File artifact); @Override void uninstall(File artifact); static final String LIST_PROVIDERS_DIRECTORY; static final String LIST_NAME_KEY; static final String LIST_TRANSLATABLE_KEY; static final String LIST_ORG_KEY; static final String LIST_DEFAULT_KEY; }
@Test public void testDefaultUninstall() throws Exception { File file = getResourceFile("/ListProvidersScannerTest-GoodProperties.properties"); listProvidersScanner.uninstall(file); assertFalse("Provider was not removed", listProvidersService.hasProvider(listName)); }
@Test public void testSpecificOrgUninstall() throws Exception { EasyMock.expect(securityService.getOrganization()).andReturn(specificOrg).anyTimes(); EasyMock.expect(specificOrg.getId()).andReturn("org1").anyTimes(); listName = "TEST.LIST.NAME"; File file = getResourceFile("/ListProvidersScannerTest-AllProperties.properties"); listProvidersScanner.uninstall(file); EasyMock.replay(); assertFalse("Provider was not removed", listProvidersService.hasProvider(listName, "org1")); }