@Test
public void readPlaceTest() throws IOException {

    when(parser.readPlace(reader)).thenCallRealMethod();
    when(reader.hasNext()).thenReturn(true, true, true, true, true, true, false);
    when(reader.nextName()).thenReturn("description", "place_id", "matched_substrings", "terms", "types", "skip");
    when(reader.nextString()).thenReturn("desc", "id");
    List<MatchedSubstring> substrings = Collections.singletonList(new MatchedSubstring(1, 2));
    when(parser.readMatchedSubstringsArray(reader)).thenReturn(substrings);
    List<DescriptionTerm> terms = Collections.singletonList(new DescriptionTerm(3, "three"));
    when(parser.readDescriptionTermsArray(reader)).thenReturn(terms);
    List<PlaceType> types = Arrays.asList(PlaceType.ROUTE, PlaceType.GEOCODE);
    when(parser.readPlaceTypesArray(reader)).thenReturn(types);
    Place expected = new Place("desc", "id", substrings, terms, types);
    Place actual = parser.readPlace(reader);
    assertEquals(expected, actual);
}