@Test
public void testPostXRequestedBy() {

  AmbariCsrfProtectionFilter filter = new AmbariCsrfProtectionFilter();
  ContainerRequest containerRequest = createMock(ContainerRequest.class);
  InBoundHeaders headers = new InBoundHeaders();
  headers.add("X-Requested-By","anything");
  expect(containerRequest.getMethod()).andReturn("GET");
  expect(containerRequest.getRequestHeaders()).andReturn(headers);
  replay(containerRequest);
  assertEquals(containerRequest, filter.filter(containerRequest));
}