@Test
public void testGetWindowStartCeiling() throws Exception {

    DateTime currentTime = new DateTime();
    final String json = String.format(
            "{ \"operator\": \"last\", \"currentTime\": %d, \"roundingMode\": \"CEILING\", \"duration\": \"1h\" }",
            currentTime.getMillis()
                                     );
    LastFilter lastFilter = objectMapper.readValue(json, LastFilter.class);
    TimeWindow timeWindow = lastFilter.getWindow();
    Assert.assertEquals("_timestamp", lastFilter.getField());
    Assert.assertEquals(currentTime.getMillis(), lastFilter.getCurrentTime());
    Assert.assertEquals(currentTime.withMinuteOfHour(0)
                                .withSecondOfMinute(0)
                                .withMillisOfSecond(0)
                                .getMillis(), timeWindow.getStartTime());
}