### Question:
SDNCChangeAssignTasks extends AbstractSDNCTask { public void changeModelVnf(BuildingBlockExecution execution) { try { GeneralBuildingBlock gBBInput = execution.getGeneralBuildingBlock(); GenericVnf genericVnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID); ServiceInstance serviceInstance = extractPojosForBB.extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID); SDNCRequest sdncRequest = new SDNCRequest(); GenericResourceApiVnfOperationInformation req = sdncVnfResources.changeModelVnf(genericVnf, serviceInstance, gBBInput.getCustomer(), gBBInput.getCloudRegion(), gBBInput.getRequestContext(), buildCallbackURI(sdncRequest)); sdncRequest.setSDNCPayload(req); sdncRequest.setTopology(SDNCTopology.VNF); execution.setVariable(SDNC_REQUEST, sdncRequest); } catch (Exception ex) { exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); } }  void changeModelServiceInstance(BuildingBlockExecution execution); void changeModelVnf(BuildingBlockExecution execution); void changeAssignNetwork(BuildingBlockExecution execution); void changeAssignModelVfModule(BuildingBlockExecution execution); static final String SDNC_REQUEST; }### Answer:
@Test public void changeModelVnfTest() throws Exception { doReturn(new GenericResourceApiVnfOperationInformation()).when(sdncVnfResources).changeModelVnf(eq(genericVnf), eq(serviceInstance), eq(customer), eq(cloudRegion), eq(requestContext), any(URI.class)); sdncChangeAssignTasks.changeModelVnf(execution); verify(sdncVnfResources, times(1)).changeModelVnf(eq(genericVnf), eq(serviceInstance), eq(customer), eq(cloudRegion), eq(requestContext), any(URI.class)); SDNCRequest sdncRequest = execution.getVariable("SDNCRequest"); assertEquals(SDNCTopology.VNF, sdncRequest.getTopology()); }
@Test public void changeModelVnfExceptionTest() throws Exception { expectedException.expect(BpmnError.class); doThrow(RuntimeException.class).when(sdncVnfResources).changeModelVnf(eq(genericVnf), eq(serviceInstance), eq(customer), eq(cloudRegion), eq(requestContext), any(URI.class)); sdncChangeAssignTasks.changeModelVnf(execution); }