test_class.file: herd-code/herd-service/src/test/java/org/finra/herd/service/helper/BusinessObjectDataSearchHelperTest.java
test_class.identifier: BusinessObjectDataSearchHelperTest
test_class.superclass: extends AbstractServiceTest
test_case.body: @Test
      public void testValidatePagingParameter()
      {
          // Happy path.
          assertEquals(INTEGER_VALUE, businessObjectDataSearchHelper.validatePagingParameter(PARAMETER_NAME, INTEGER_VALUE, null, Integer.MAX_VALUE));
  
          // Test the default value assignment.
          assertEquals(INTEGER_VALUE_2, businessObjectDataSearchHelper.validatePagingParameter(PARAMETER_NAME, null, INTEGER_VALUE_2, Integer.MAX_VALUE));
  
          // Try to validate a parameter value that is less than 1.
          try
          {
              businessObjectDataSearchHelper.validatePagingParameter(PARAMETER_NAME, 0, null, Integer.MAX_VALUE);
              fail();
          }
          catch (IllegalArgumentException e)
          {
              assertEquals(String.format("A %s greater than 0 must be specified.", PARAMETER_NAME), e.getMessage());
          }
  
          // Try to validate a parameter value that is greater than the specified max value.
          try
          {
              businessObjectDataSearchHelper.validatePagingParameter(PARAMETER_NAME, Integer.MAX_VALUE, null, Integer.MAX_VALUE - 1);
              fail();
          }
          catch (IllegalArgumentException e)
          {
              assertEquals(String.format("A %s less than %d must be specified.", PARAMETER_NAME, Integer.MAX_VALUE - 1), e.getMessage());
          }
      }
test_case.class_method_signature: BusinessObjectDataSearchHelperTest.testValidatePagingParameter()
test_case.full_signature: @Test public void testValidatePagingParameter()
test_case.identifier: testValidatePagingParameter
test_case.invocations: assertEquals validatePagingParameter assertEquals validatePagingParameter validatePagingParameter fail assertEquals format getMessage validatePagingParameter fail assertEquals format getMessage
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testValidatePagingParameter()
focal_class.declarator: alternateKeyHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private AlternateKeyHelper alternateKeyHelper;
focal_class.type: AlternateKeyHelper
focal_class.var_name: alternateKeyHelper
focal_class.declarator: businessObjectDataHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private BusinessObjectDataHelper businessObjectDataHelper;
focal_class.type: BusinessObjectDataHelper
focal_class.var_name: businessObjectDataHelper
focal_class.declarator: configurationHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private ConfigurationHelper configurationHelper;
focal_class.type: ConfigurationHelper
focal_class.var_name: configurationHelper
focal_class.file: herd-code/herd-service/src/main/java/org/finra/herd/service/helper/BusinessObjectDataSearchHelper.java
focal_class.identifier: BusinessObjectDataSearchHelper
focal_class.class_method_signature: BusinessObjectDataSearchHelper.validateBusinessObjectDataSearchRequest(BusinessObjectDataSearchRequest businessObjectDataSearchRequest)
focal_class.full_signature: public void validateBusinessObjectDataSearchRequest(BusinessObjectDataSearchRequest businessObjectDataSearchRequest)
focal_class.identifier: validateBusinessObjectDataSearchRequest
focal_class.modifiers: public
focal_class.parameters: (BusinessObjectDataSearchRequest businessObjectDataSearchRequest)
focal_class.return: void
focal_class.signature: void validateBusinessObjectDataSearchRequest(BusinessObjectDataSearchRequest businessObjectDataSearchRequest)
focal_class.class_method_signature: BusinessObjectDataSearchHelper.validatePagingParameter(String parameterName, Integer parameterValue, Integer defaultParameterValue, Integer maxParameterValue)
focal_class.full_signature: public Integer validatePagingParameter(String parameterName, Integer parameterValue, Integer defaultParameterValue, Integer maxParameterValue)
focal_class.identifier: validatePagingParameter
focal_class.modifiers: public
focal_class.parameters: (String parameterName, Integer parameterValue, Integer defaultParameterValue, Integer maxParameterValue)
focal_class.return: Integer
focal_class.signature: Integer validatePagingParameter(String parameterName, Integer parameterValue, Integer defaultParameterValue, Integer maxParameterValue)
focal_class.class_method_signature: BusinessObjectDataSearchHelper.validateBusinessObjectDataSearchKey(BusinessObjectDataSearchKey businessObjectDataSearchKey)
focal_class.full_signature:  void validateBusinessObjectDataSearchKey(BusinessObjectDataSearchKey businessObjectDataSearchKey)
focal_class.identifier: validateBusinessObjectDataSearchKey
focal_class.parameters: (BusinessObjectDataSearchKey businessObjectDataSearchKey)
focal_class.return: void
focal_class.signature: void validateBusinessObjectDataSearchKey(BusinessObjectDataSearchKey businessObjectDataSearchKey)
focal_method.body: public Integer validatePagingParameter(String parameterName, Integer parameterValue, Integer defaultParameterValue, Integer maxParameterValue)
      {
          if (parameterValue == null)
          {
              parameterValue = defaultParameterValue;
          }
          else if (parameterValue < 1)
          {
              throw new IllegalArgumentException(String.format("A %s greater than 0 must be specified.", parameterName));
          }
          else if (parameterValue > maxParameterValue)
          {
              throw new IllegalArgumentException(String.format("A %s less than %d must be specified.", parameterName, maxParameterValue));
          }
  
          return parameterValue;
      }
focal_method.class_method_signature: BusinessObjectDataSearchHelper.validatePagingParameter(String parameterName, Integer parameterValue, Integer defaultParameterValue, Integer maxParameterValue)
focal_method.full_signature: public Integer validatePagingParameter(String parameterName, Integer parameterValue, Integer defaultParameterValue, Integer maxParameterValue)
focal_method.identifier: validatePagingParameter
focal_method.invocations: format format
focal_method.modifiers: public
focal_method.parameters: (String parameterName, Integer parameterValue, Integer defaultParameterValue, Integer maxParameterValue)
focal_method.return: Integer
focal_method.signature: Integer validatePagingParameter(String parameterName, Integer parameterValue, Integer defaultParameterValue, Integer maxParameterValue)