@Test public void shouldNotAddIdOrderingIfItsPresent() { when(gridSettings.getSortColumn()).thenReturn(Constants.Util.ID_FIELD_NAME); when(gridSettings.getSortDirection()).thenReturn("descending"); QueryParams queryParams = QueryParamsBuilder.buildQueryParams(gridSettings); assertNotNull(queryParams); assertEquals(1, queryParams.getOrderList().size()); assertOrderPresent(queryParams, 0, Constants.Util.ID_FIELD_NAME, Order.Direction.DESC); }
public static QueryParams buildQueryParams(GridSettings settings) { return buildQueryParams(settings, buildOrderList(settings, null)); }
QueryParamsBuilder { public static QueryParams buildQueryParams(GridSettings settings) { return buildQueryParams(settings, buildOrderList(settings, null)); } }
QueryParamsBuilder { public static QueryParams buildQueryParams(GridSettings settings) { return buildQueryParams(settings, buildOrderList(settings, null)); } private  QueryParamsBuilder(); }
QueryParamsBuilder { public static QueryParams buildQueryParams(GridSettings settings) { return buildQueryParams(settings, buildOrderList(settings, null)); } private  QueryParamsBuilder(); static QueryParams buildQueryParams(GridSettings settings); static QueryParams buildQueryParams(GridSettings settings, Map<String, Object> lookupMap); static QueryParams buildQueryParams(GridSettings settings, List<Order> orderList); static List<Order> buildOrderList(GridSettings settings, Map<String, Object> lookupMap); }
QueryParamsBuilder { public static QueryParams buildQueryParams(GridSettings settings) { return buildQueryParams(settings, buildOrderList(settings, null)); } private  QueryParamsBuilder(); static QueryParams buildQueryParams(GridSettings settings); static QueryParams buildQueryParams(GridSettings settings, Map<String, Object> lookupMap); static QueryParams buildQueryParams(GridSettings settings, List<Order> orderList); static List<Order> buildOrderList(GridSettings settings, Map<String, Object> lookupMap); static final int DEFAULT_PAGE; static final int DEFAULT_PAGE_SIZE; }