@Test
public void readAddressComponentsArrayTest() throws IOException {

    when(parser.readAddressComponentsArray(reader)).thenCallRealMethod();
    when(reader.hasNext()).thenReturn(true, true, true, true, true, false, true, false, false);
    when(reader.nextName()).thenReturn("long_name", "short_name", "types", "skip");
    when(reader.nextString()).thenReturn("long", "short");
    List<AddressComponentType> types = Arrays.asList(AddressComponentType.ROOM, AddressComponentType.FLOOR);
    when(parser.readAddressComponentTypesArray(reader)).thenReturn(types);
    List<AddressComponent> expected = Arrays.asList(new AddressComponent("long", "short", types), new AddressComponent(null, null, null));
    List<AddressComponent> actual = parser.readAddressComponentsArray(reader);
    assertEquals(expected, actual);
}