@Test public void handlePreflight_allowsOrigin() {

  handler = new CorsHandler("http://foobar.com");
  handlePreflight(
    ImmutableMap.of(
      "Origin", "http://foobar.com",
      "Access-Control-Request-Method", "POST",
      "Access-Control-Request-Headers", "origin"),
    ImmutableMap.of(
      "vary", "origin,access-control-request-method,access-control-request-headers",
      "access-control-allow-origin", "http://foobar.com",
      "access-control-allow-methods", "POST",
      "access-control-allow-headers", "origin"
    )
  );
}