ConnectorDeployerService extends AbstractOpenEngSBService implements ArtifactInstaller { @Override public boolean canHandle(File artifact) { LOGGER.debug("ConnectorDeployer.canHandle(\"{}\")", artifact.getAbsolutePath()); if (artifact.isFile() && artifact.getName().endsWith(CONNECTOR_EXTENSION)) { LOGGER.info("Found a .connector file to deploy."); return true; } return false; }  void init(); @Override boolean canHandle(File artifact); @Override void install(File artifact); void tryInstallFailed(); @Override void update(File artifact); @Override void uninstall(final File artifact); void setServiceManager(ConnectorManager serviceManager); void setBundleContext(BundleContext bundleContext);  }
@Test public void testConnectorFiles_shouldBeHandledByDeployer() throws Exception { File connectorFile = temporaryFolder.newFile(TEST_FILE_NAME); assertThat(connectorDeployerService.canHandle(connectorFile), is(true)); }
@Test public void testUnknownFiles_shouldNotBeHandledByDeplyoer() throws Exception { File otherFile = temporaryFolder.newFile("other.txt"); assertThat(connectorDeployerService.canHandle(otherFile), is(false)); }