ExecuteRegionFunction66 extends BaseCommand { String generateNullArgumentMessage(String regionName, Object function) { String message = null; if (regionName == null) { message = "The input region for the execute function request is null"; } else if (function == null) { message = "The input function for the execute function request is null"; } return message; } ExecuteRegionFunction66(); static Command getCommand(); @Override void cmdExecute(final Message clientMessage, final ServerConnection serverConnection,
      final SecurityService securityService, long start);  }
@Test public void generateNullArgumentMessageIfRegionIsNull() { AbstractExecution execution = mock(AbstractExecution.class); when(execution.execute(functionObject)).thenReturn(mock(ResultCollector.class)); assertEquals("The input region for the execute function request is null", this.executeRegionFunction66.generateNullArgumentMessage(null, null)); }
@Test public void generateNullArgumentMessageIfFunctionIsNullAndRegionIsNotNull() { AbstractExecution execution = mock(AbstractExecution.class); when(execution.execute(functionObject)).thenReturn(mock(ResultCollector.class)); assertEquals("The input function for the execute function request is null", this.executeRegionFunction66.generateNullArgumentMessage("someRegion", null)); }