### Question:
VnfAdapterImpl { public void preProcessVnfAdapter(BuildingBlockExecution execution) { try { GeneralBuildingBlock gBBInput = execution.getGeneralBuildingBlock(); ServiceInstance serviceInstance = extractPojosForBB.extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID); execution.setVariable("mso-request-id", gBBInput.getRequestContext().getMsoRequestId()); execution.setVariable("mso-service-instance-id", serviceInstance.getServiceInstanceId()); execution.setVariable(HEAT_STACK_ID, null); execution.setVariable(CONTRAIL_SERVICE_INSTANCE_FQDN, null); execution.setVariable(OAM_MANAGEMENT_V4_ADDRESS, null); execution.setVariable(OAM_MANAGEMENT_V6_ADDRESS, null); execution.setVariable(CONTRAIL_NETWORK_POLICY_FQDN_LIST, null); } catch (Exception ex) { exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); } }  void preProcessVnfAdapter(BuildingBlockExecution execution); void postProcessVnfAdapter(BuildingBlockExecution execution); static final String HEAT_STACK_ID; }### Answer:
@Test public void preProcessVnfAdapterTest() { vnfAdapterImpl.preProcessVnfAdapter(execution); assertEquals(requestContext.getMsoRequestId(), execution.getVariable("mso-request-id")); assertEquals(serviceInstance.getServiceInstanceId(), execution.getVariable("mso-service-instance-id")); }
@Test public void preProcessVnfAdapterExceptionTest() throws BBObjectNotFoundException { expectedException.expect(BpmnError.class); doThrow(RuntimeException.class).when(extractPojosForBB).extractByKey(any(), ArgumentMatchers.eq(ResourceKey.SERVICE_INSTANCE_ID)); vnfAdapterImpl.preProcessVnfAdapter(execution); }