@Test
public void testGetRequestsByStatusWithParams() throws AmbariException {

  List<Long> ids = new ArrayList<Long>();
  for (long l = 1; l <= 10; l++) {
    ids.add(l);
  }
  for (Long id : ids) {
    populateActionDB(db, hostName, id, stageId);
  }
  List<Long> expected = null;
  List<Long> actual = null;
  // Select all requests
  actual = db.getRequestsByStatus(null, BaseRequest.DEFAULT_PAGE_SIZE, false);
  expected = reverse(new ArrayList<Long>(ids));
  assertEquals("Request IDs not matches", expected, actual);
  actual = db.getRequestsByStatus(null, 4, false);
  expected = reverse(new ArrayList<Long>(ids.subList(ids.size() - 4, ids.size())));
  assertEquals("Request IDs not matches", expected, actual);
  actual = db.getRequestsByStatus(null, 7, true);
  expected = new ArrayList<Long>(ids.subList(0, 7));
  assertEquals("Request IDs not matches", expected, actual);
}