### Question:
Advice implements AsmVisitorWrapper.ForDeclaredMethods.MethodVisitorWrapper, Implementation { public static WithCustomMapping withCustomMapping() { return new WithCustomMapping(); } protected  Advice(Dispatcher.Resolved.ForMethodEnter methodEnter, Dispatcher.Resolved.ForMethodExit methodExit); private  Advice(Dispatcher.Resolved.ForMethodEnter methodEnter,
                   Dispatcher.Resolved.ForMethodExit methodExit,
                   Assigner assigner,
                   ExceptionHandler exceptionHandler,
                   Implementation delegate); static Advice to(Class<?> advice); static Advice to(Class<?> advice, ClassFileLocator classFileLocator); static Advice to(TypeDescription advice); static Advice to(TypeDescription advice, ClassFileLocator classFileLocator); static Advice to(Class<?> enterAdvice, Class<?> exitAdvice); static Advice to(Class<?> enterAdvice, Class<?> exitAdvice, ClassFileLocator classFileLocator); static Advice to(TypeDescription enterAdvice, TypeDescription exitAdvice); static Advice to(TypeDescription enterAdvice, TypeDescription exitAdvice, ClassFileLocator classFileLocator); static WithCustomMapping withCustomMapping(); AsmVisitorWrapper.ForDeclaredMethods on(ElementMatcher<? super MethodDescription> matcher); MethodVisitor wrap(TypeDescription instrumentedType,
                              MethodDescription instrumentedMethod,
                              MethodVisitor methodVisitor,
                              Implementation.Context implementationContext,
                              TypePool typePool,
                              int writerFlags,
                              int readerFlags); InstrumentedType prepare(InstrumentedType instrumentedType); ByteCodeAppender appender(Target implementationTarget); Advice withAssigner(Assigner assigner); Advice withExceptionPrinting(); Advice withExceptionHandler(StackManipulation exceptionHandler); Advice withExceptionHandler(ExceptionHandler exceptionHandler); Implementation wrap(Implementation implementation);  }### Answer:
@Test(expected = IllegalArgumentException.class) public void testNotAnnotationType() throws Exception { Advice.withCustomMapping().bind(Annotation.class, (Serializable) null); }
@Test(expected = IllegalArgumentException.class) public void testMethodNegativeIndex() throws Exception { Advice.withCustomMapping().bind(Custom.class, Sample.class.getDeclaredMethod(BAR, String.class), -1); }
@Test(expected = IllegalArgumentException.class) public void testMethodOverflowIndex() throws Exception { Advice.withCustomMapping().bind(Custom.class, Sample.class.getDeclaredMethod(BAR, String.class), 1); }
@Test(expected = IllegalArgumentException.class) public void testConstrcutorNegativeIndex() throws Exception { Advice.withCustomMapping().bind(Custom.class, Sample.class.getDeclaredConstructor(), -1); }
@Test(expected = IllegalArgumentException.class) public void testConstructorOverflowIndex() throws Exception { Advice.withCustomMapping().bind(Custom.class, Sample.class.getDeclaredConstructor(), 0); }
@Test(expected = IllegalArgumentException.class) public void testDuplicateRegistration() throws Exception { Advice.withCustomMapping().bind(Custom.class, FOO).bind(Custom.class, FOO); }