@Test
public void shouldInjectOnlyAttributesWithSameType() throws Exception {

	Object result = mock(Result.class);
	ResourceBundle emptyBundle = mock(ResourceBundle.class);
	ResourceMethod method = DefaultResourceMethod.instanceFor(OtherResource.class, 
			OtherResource.class.getDeclaredMethod("logic", String.class));
	when(request.getAttribute("result")).thenReturn(result);
	when(request.getParameterValues("result")).thenReturn(new String[] { "buggy" });
	when(request.getParameterNames()).thenReturn(enumeration(asList("result")));
	when(nameProvider.parameterNamesFor(method.getMethod())).thenReturn(new String[] { "result" });
	List<Message> errors = new ArrayList<Message>();
	Object[] out = provider.getParametersFor(method, errors, emptyBundle);
	assertThat(out[0], is(not(result)));
}