@Override
  public boolean equals(Object obj)
  {
    if (this == obj)
    {
      return true;
    }

    if (obj == null || getClass() != obj.getClass())
    {
      return false;
    }

    return areNewFieldsEqual((Request<?>) obj);
  }
@Test(dataProvider = "toRequestFieldsData")
  public void testRequestPagingFieldsEqual(List<PathSpec> pathSpecs1, List<PathSpec> pathSpecs2, Map<String,String> param1,  Map<String,String> param2, boolean expect)
  {
    GetRequestBuilder<Long, TestRecord> builder1 = generateDummyRequestBuilder();
    GetRequestBuilder<Long, TestRecord> builder2 = generateDummyRequestBuilder();

    for (Map.Entry<String, String> entry : param1.entrySet())
    {
      builder1.setParam(entry.getKey(), entry.getValue());
    }

    for (Map.Entry<String, String> entry : param2.entrySet())
    {
      builder2.setParam(entry.getKey(), entry.getValue());
    }

    builder1.addPagingFields(pathSpecs1.toArray(new PathSpec[pathSpecs1.size()]));
    builder2.addPagingFields(pathSpecs2.toArray(new PathSpec[pathSpecs2.size()]));

    assertEquals(builder1.build().equals(builder2.build()), expect);
  }