### Question:
PnfConfigCdsControllerDE implements ControllerRunnable<DelegateExecution> { @Override public Boolean understand(ControllerContext<DelegateExecution> context) { return PayloadConstants.CDS_ACTOR.equalsIgnoreCase(context.getControllerActor()) && PayloadConstants.PNF_SCOPE.equalsIgnoreCase(context.getControllerScope()) && (ASSIGN_ACTION.equalsIgnoreCase(context.getControllerAction()) || DEPLOY_ACTION.equalsIgnoreCase(context.getControllerAction())); }  @Override Boolean understand(ControllerContext<DelegateExecution> context); @Override Boolean ready(ControllerContext<DelegateExecution> context); @Override void prepare(ControllerContext<DelegateExecution> context); @Override void run(ControllerContext<DelegateExecution> context);  }### Answer:
@Test public void testUnderstand_action_assign_TrueReturned() { when(controllerContext.getControllerActor()).thenReturn("cds"); when(controllerContext.getControllerScope()).thenReturn("pnf"); when(controllerContext.getControllerAction()).thenReturn("config-assign"); assertTrue(pnfConfigCdsControllerDE.understand(controllerContext)); }
@Test public void testUnderstand_action_deploy_TrueReturned() { when(controllerContext.getControllerActor()).thenReturn("cds"); when(controllerContext.getControllerScope()).thenReturn("pnf"); when(controllerContext.getControllerAction()).thenReturn("config-deploy"); assertTrue(pnfConfigCdsControllerDE.understand(controllerContext)); }
@Test public void testUnderstand_action_any_FalseReturned() { when(controllerContext.getControllerActor()).thenReturn("cds"); when(controllerContext.getControllerScope()).thenReturn("pnf"); when(controllerContext.getControllerAction()).thenReturn("any-action"); assertFalse(pnfConfigCdsControllerDE.understand(controllerContext)); }
@Test public void testUnderstand_invalidContext_FalseReturned() { when(controllerContext.getControllerActor()).thenReturn("appc"); assertFalse(pnfConfigCdsControllerDE.understand(controllerContext)); }