@Test
public void shouldThrowExceptionIfInvalidDatesProvided() throws IOException {

  GetFeatureStatisticsRequest request =
      GetFeatureStatisticsRequest.newBuilder()
          .setStartDate(Timestamp.newBuilder().setSeconds(1))
          .setEndDate(Timestamp.newBuilder().setSeconds(0))
          .build();
  expectedException.expect(IllegalArgumentException.class);
  expectedException.expectMessage(
      "Invalid request. Start timestamp 1 is greater than the end timestamp 0");
  statsService.getFeatureStatistics(request);
}