@Test
public void testConfigureCompression() throws Exception {

  final ServletContextHandler handler =
      EasyMock.createNiceMock(ServletContextHandler.class);
  final FilterHolder filter = EasyMock.createNiceMock(FilterHolder.class);
  EasyMock.expect(handler.addFilter(GzipFilter.class, "/*",
      EnumSet.of(DispatcherType.REQUEST))).andReturn(filter).once();
  filter.setInitParameter(anyObject(String.class),anyObject(String.class));
  EasyMock.expectLastCall().times(3);
  replay(handler, filter);
  injector.getInstance(AmbariServer.class).configureHandlerCompression(handler);
  EasyMock.verify(handler);
}