@Test
public void shouldBeAbleToDeserializeACatWhenMethodHasMoreThanOneArgumentAndTheXmlIsTheLastOne() throws Exception {

	InputStream stream = new ByteArrayInputStream("{\"cat\":{\"name\": \"Tigre\", \"age\": 3}}".getBytes());
	when(provider.parameterNamesFor(sleep.getMethod())).thenReturn(new String[] {"hours", "cat"});
	Object[] deserialized = deserializer.deserialize(stream, sleep);
	assertThat(deserialized.length, is(2));
	assertThat(deserialized[1], is(instanceOf(Cat.class)));
	Cat cat = (Cat) deserialized[1];
	assertThat(cat.name, is("Tigre"));
	assertThat(cat.age, is(3));
}