@Test(expected = WebApplicationException.class)
public void testPostNoXRequestedBy() {

  AmbariCsrfProtectionFilter filter = new AmbariCsrfProtectionFilter();
  ContainerRequest containerRequest = createMock(ContainerRequest.class);
  InBoundHeaders headers = new InBoundHeaders();
  expect(containerRequest.getMethod()).andReturn("POST");
  expect(containerRequest.getRequestHeaders()).andReturn(headers);
  replay(containerRequest);
  filter.filter(containerRequest);
}