Code example for Invokable

Methods: getAnnotation

0
   protected void assertRequestLineEquals(HttpRequest request, String toMatch) { 
      assertEquals(request.getRequestLine(), toMatch); 
   } 
 
   protected void assertFallbackClassEquals(Invokable<?, ?> method, @Nullable Class<?> expected) { 
      Fallback fallbackAnnotation = method.getAnnotation(Fallback.class); 
      Class<?> assigned = fallbackAnnotation != null ? fallbackAnnotation.value() : MapHttp4xxCodesToExceptions.class; 
      if (expected == null) 
         assertEquals(assigned, MapHttp4xxCodesToExceptions.class); 
      else 
         assertEquals(assigned, expected); 
   } 
 
   protected void assertSaxResponseParserClassEquals(Invokable<?, ?> method, @Nullable Class<?> parserClass) { 
      XMLResponseParser annotation = method.getAnnotation(XMLResponseParser.class); 
      Class<?> expected =  (annotation != null) ? annotation.value() : null; 
      assertEquals(expected, parserClass); 
   } 
 
   protected void assertResponseParserClassEquals(Invokable<?, ?> method, GeneratedHttpRequest request, 
Experience pair programming with AI  Get Codota for Java