@Test
public void shouldThrowExceptionIfNeitherDatesNorDatasetsProvided() throws IOException {

  GetFeatureStatisticsRequest request = GetFeatureStatisticsRequest.newBuilder().build();
  expectedException.expect(IllegalArgumentException.class);
  expectedException.expectMessage(
      "Invalid request. Either provide dataset ids to retrieve statistics over, or a start date and end date.");
  statsService.getFeatureStatistics(request);
}