@Test
public void shouldBeAbleToDeserializeADogWhenAliasConfiguredByAnnotations() {


	InputStream stream = new ByteArrayInputStream("<dogAnnotated><nameAnnotated>Lubi</nameAnnotated><ageAnnotated>8</ageAnnotated></dogAnnotated>".getBytes());
	
	when(provider.parameterNamesFor(annotated.getMethod())).thenReturn(new String[] {"dog"});
	
	Object[] deserialized = deserializer.deserialize(stream, annotated);
	
	assertThat(deserialized.length, is(1));
	assertThat(deserialized[0], is(instanceOf(DogWithAnnotations.class)));
	
	DogWithAnnotations dog = (DogWithAnnotations) deserialized[0];
	assertThat(dog.name, is("Lubi"));
	assertThat(dog.age, is(8));
}