### Question:
AggregatedMatchedBetsReader extends PageableResponseReader<AggregatedMatchedBet, AggregatedMatchedBetsResponse> { @Override public AggregatedMatchedBetsResponse readFullResponse() throws MatchbookSDKParsingException { final AggregatedMatchedBetsResponse 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 ("currency".equals(fieldName)) { pageableResponse.setCurrency(parser.getEnum(Currency.class)); } else if ("exchange-type".equals(fieldName)) { pageableResponse.setExchangeType(parser.getEnum(ExchangeType.class)); } else if ("odds-type".equals(fieldName)) { pageableResponse.setOddsType(parser.getEnum(OddsType.class)); } else if (itemsFieldName().equals(fieldName)) { List<AggregatedMatchedBet> items = readItems(); pageableResponse.setItems(items); } parser.moveToNextToken(); } readingItemStatus = ReadingItemsStatus.READ; return pageableResponse; } AggregatedMatchedBetsReader(); @VisibleForTesting  AggregatedMatchedBetsReader(AggregatedMatchedBetReader aggregatedMatchedBetReader); @Override AggregatedMatchedBetsResponse readFullResponse();  }### Answer:
@Test @Override @DisplayName("Read full response") protected void readFullResponseTest() { when(parser.isEndOfObject()).thenReturn(false, false, false, false, false, false, false, true); when(parser.getFieldName()).thenReturn("total", "offset", "per-page", "currency", "exchange-type", "odds-type", "matched-bets"); when(parser.getInteger()).thenReturn(42, 0, 20); when(parser.getEnum(Currency.class)).thenReturn(Currency.HKD); when(parser.getEnum(ExchangeType.class)).thenReturn(ExchangeType.BINARY); when(parser.getEnum(OddsType.class)).thenReturn(OddsType.PERCENTAGE); when(parser.isEndOfArray()).thenReturn(false, true); when(aggregatedMatchedBetReader.readFullResponse()).thenReturn(aggregatedMatchedBet); AggregatedMatchedBetsResponse aggregatedMatchedBets = unit.readFullResponse(); assertThat(aggregatedMatchedBets).isNotNull(); assertThat(aggregatedMatchedBets.getTotal()).isEqualTo(42); assertThat(aggregatedMatchedBets.getOffset()).isEqualTo(0); assertThat(aggregatedMatchedBets.getPerPage()).isEqualTo(20); assertThat(aggregatedMatchedBets.getCurrency()).isEqualTo(Currency.HKD); assertThat(aggregatedMatchedBets.getExchangeType()).isEqualTo(ExchangeType.BINARY); assertThat(aggregatedMatchedBets.getOddsType()).isEqualTo(OddsType.PERCENTAGE); assertThat(aggregatedMatchedBets.getItems()).containsOnly(aggregatedMatchedBet); assertThat(unit.hasMoreItems()).isFalse(); }