### Question:
OSGiRuntimeContainerDelegate extends RuntimeContainerDelegateImpl { @Override public void deployProcessApplication(AbstractProcessApplication processApplication) { if(processApplication == null) { throw new ProcessEngineException("Process application cannot be null"); } final String operationName = "Deployment of Process Application "+processApplication.getName(); getServiceContainer().createDeploymentOperation(operationName) .addAttachment(Attachments.PROCESS_APPLICATION, processApplication) .addStep(new OSGiParseProcessesXmlStep()) .addStep(new OSGiProcessesXmlStartProcessEnginesStep(context)) .addStep(new OSGiDeployProcessArchivesStep()) .addStep(new StartProcessApplicationServiceStep()) .addStep(new PostDeployInvocationStep()) .execute(); LOGGER.info("Process Application "+processApplication.getName()+" successfully deployed."); } OSGiRuntimeContainerDelegate(BundleContext context); @Override void deployProcessApplication(AbstractProcessApplication processApplication);  }### Answer:
@Test(expected = ProcessEngineException.class) public void deployNullProcessApplication() { new TestOSGiRuntimeContainerDelegate(null).deployProcessApplication(null); }
@Test public void deployProcessApplication() { AbstractProcessApplication app = mock(AbstractProcessApplication.class); new TestOSGiRuntimeContainerDelegate(null).deployProcessApplication(app); Map<String, Object> attachments = builder.getAttachments(); Set<Entry<String, Object>> entrySet = attachments.entrySet(); assertThat(entrySet.size(), is(1)); Entry<String, Object> entry = entrySet.iterator().next(); assertThat(entry.getKey(), is(Attachments.PROCESS_APPLICATION)); assertThat((AbstractProcessApplication) entry.getValue(), is(theInstance(app))); List<DeploymentOperationStep> steps = builder.getSteps(); for (DeploymentOperationStep step : steps) { assertThat( step, is(anyOf(instanceOf(OSGiParseProcessesXmlStep.class), instanceOf(OSGiProcessesXmlStartProcessEnginesStep.class), instanceOf(DeployProcessArchivesStep.class), instanceOf(StartProcessApplicationServiceStep.class), instanceOf(PostDeployInvocationStep.class)))); } }