	@Test
	public void invokeInvokesFirstSupportedDelegate() throws Throwable {

		
		// CHECKSTYLE:ON
		
		Method method = ResourceContent.class.getMethod("method1");
		
		ConditionalMethodHandler expectedHandler = newHandlerSupportedFor(method);
		
		MethodHandlerChain chain = new MethodHandlerChain(asList(
			newHandlerUnsupportedFor(method),
			expectedHandler,
			newHandlerSupportedFor(method)
		));
		
		Method proceedMethod = ResourceContent.class.getMethod("method2");
		Object self = new Object();
		Object arg = new Object();
		
		chain.invoke(self, method, proceedMethod, new Object[] {arg});
		
		verify(expectedHandler).invoke(eq(self), eq(method), eq(proceedMethod), argThat(arrayContaining(arg)));
	}