@Test
public void extractMethodFail() throws Exception {

  String[][] mm = {
      { "POST", "bla", null },
      { "POST", "PUT", "PATCH" },
      { "OPTIONS", null, null }
  };
  for (String[] m : mm) {
    HttpServletRequest hr = mock(HttpServletRequest.class);
    when(hr.getMethod()).thenReturn(m[0]);
    when(hr.getHeader("X-HTTP-Method")).thenReturn(m[1]);
    when(hr.getHeader("X-HTTP-Method-Override")).thenReturn(m[2]);
    try {
      ODataHttpHandlerImpl.extractMethod(hr);
      fail();
    } catch (ODataLibraryException e) {
      // expected
    }
  }
}