public static boolean parseReturnEntityParameter(final String value)
  {
    switch (value.toLowerCase()) {
      case "true":
        return true;
      case "false":
        return false;
      default:
        throw new RestLiServiceException(HttpStatus.S_400_BAD_REQUEST, String.format("Invalid \"%s\" parameter: %s", RestConstants.RETURN_ENTITY_PARAM, value));
    }
  }
@Test(dataProvider = "parseReturnEntityParameterData")
  public void testParseReturnEntityParameter(String paramValue, Boolean expectedValue, boolean expectException)
  {
    try
    {
      boolean value = ArgumentUtils.parseReturnEntityParameter(paramValue);

      if (expectException)
      {
        Assert.fail("Expected \"" + RestConstants.RETURN_ENTITY_PARAM + "\" parameter parse to fail for value: " + paramValue);
      }

      Assert.assertEquals(value, (boolean) expectedValue);
    }
    catch (RestLiServiceException e)
    {
      if (!expectException)
      {
        Assert.fail("Expected \"" + RestConstants.RETURN_ENTITY_PARAM + "\" parameter parse to succeed for value: " + paramValue);
      }

      Assert.assertEquals(e.getStatus(), HttpStatus.S_400_BAD_REQUEST);
      Assert.assertTrue(e.getMessage().contains(String.format("Invalid \"%s\" parameter: %s", RestConstants.RETURN_ENTITY_PARAM, paramValue)));
    }
  }