### Question:
PageableResponseReader extends BaseReader<T, R> { @Override public R readFullResponse() throws MatchbookSDKParsingException { final R pageableResponse = newPageableResponse(); while (!parser.isEndOfObject()) { parser.moveToNextValue(); String fieldName = parser.getFieldName(); if ("total".equals(fieldName)) { pageableResponse.setTotal(parser.getInteger()); } else if ("offset".equals(fieldName)) { pageableResponse.setOffset(parser.getInteger()); } else if ("per-page".equals(fieldName)) { pageableResponse.setPerPage(parser.getInteger()); } else if (itemsFieldName().equals(fieldName)) { List<T> items = readItems(); pageableResponse.setItems(items); } parser.moveToNextToken(); } readingItemStatus = ReadingItemsStatus.READ; return pageableResponse; } protected  PageableResponseReader(ResponseReader<T> itemsReader); @Override T readNextItem(); @Override R readFullResponse();  }### Answer:
@Test @DisplayName("Read full response") protected void readFullResponseTest() { when(parser.isEndOfObject()).thenReturn(false, false, false, false, true); when(parser.getFieldName()).thenReturn("total", "offset", "per-page", getItemsFieldName()); when(parser.getInteger()).thenReturn(42, 0, 20); when(parser.isEndOfArray()).thenReturn(false, true); ResponseReader<T> itemsReader = getItemsReader(); T item = getItem(); when(itemsReader.readFullResponse()).thenReturn(item); R response = unit.readFullResponse(); assertThat(response).isNotNull(); assertThat(response.getTotal()).isEqualTo(42); assertThat(response.getOffset()).isEqualTo(0); assertThat(response.getPerPage()).isEqualTo(20); assertThat(response.getItems()).containsOnly(item); assertThat(unit.hasMoreItems()).isFalse(); }