@Test public void testPastWeatherAsync() throws IOException {

    CompletableFuture<List<WeatherInfo>> cf = WeatherWebApi
        .pastWeather(37.017, -7.933, parse("2019-04-01"), parse("2019-04-30"));
    cf
        .thenAccept(wis -> wis.stream().findFirst().ifPresent(out::println))
        .join();
    cf
        .thenApply(wis -> wis.stream().mapToInt(WeatherInfo::getTempC).max())
        .thenAccept(temp -> temp.ifPresent(out::println))
        .join();
}