use of io.druid.server.security.AuthConfig in project druid by druid-io.
the class IntervalsResourceTest method testGetSpecificIntervals.
@Test
public void testGetSpecificIntervals() {
EasyMock.expect(inventoryView.getInventory()).andReturn(ImmutableList.of(server)).atLeastOnce();
EasyMock.replay(inventoryView);
IntervalsResource intervalsResource = new IntervalsResource(inventoryView, new AuthConfig());
Response response = intervalsResource.getSpecificIntervals("2010-01-01T00:00:00.000Z/P1D", null, null, request);
Map<String, Object> actualIntervals = (Map) response.getEntity();
Assert.assertEquals(2, actualIntervals.size());
Assert.assertEquals(25L, actualIntervals.get("size"));
Assert.assertEquals(2, actualIntervals.get("count"));
}
Aggregations