ContextDeployerService extends AbstractOpenEngSBService implements ArtifactInstaller { @Override public boolean canHandle(File artifact) { LOGGER.debug("ContextDeployerService.canHandle(\"{}\")", artifact.getAbsolutePath()); if (artifact.isFile() && artifact.getName().endsWith(CONTEXT_EXTENSION)) { LOGGER.info("Found a .context file to deploy."); return true; } return false; }  @Override boolean canHandle(File artifact); @Override void install(File artifact); @Override void update(File artifact); @Override void uninstall(File artifact); void setContextCurrentService(ContextCurrentService contextCurrentService);  }
@Test public void testContextDeployerService_canHandleContextFiles() throws Exception { File contextFile = temporaryFolder.newFile("example.context"); assertThat(contextDeployerService.canHandle(contextFile), is(true)); }
@Test public void testUnknownFiles_shouldNotBeHandledByDeployer() throws Exception { File otherFile = temporaryFolder.newFile("other.connector"); assertThat(contextDeployerService.canHandle(otherFile), is(false)); }