@Test(expected=ValidationException.class)
public void onXMLSerializationResultShouldThrowExceptionOnlyOnSerializeMethod() throws Exception {

	JSONSerialization serialization = mock(JSONSerialization.class);
	serializerBuilder = mock(SerializerBuilder.class, new Answer<SerializerBuilder>() {
		public SerializerBuilder answer(InvocationOnMock invocation) throws Throwable {
			return serializerBuilder;
		}
	});
	when(result.use(JSONSerialization.class)).thenReturn(serialization);
	when(serialization.from(any())).thenReturn(serializerBuilder);
	try {
		factory.instanceFor(JSONSerialization.class, errors).from(new Object());
		factory.instanceFor(JSONSerialization.class, errors).from(new Object()).include("abc");
		factory.instanceFor(JSONSerialization.class, errors).from(new Object()).exclude("abc");
	} catch (ValidationException e) {
		Assert.fail("Should not throw exception yet");
	}
	factory.instanceFor(JSONSerialization.class, errors).from(new Object()).serialize();
}