}
@Test
public void shouldThrowMarshallExceptionOnInvalidParameter() throws Exception {
try {
collection.findOne("{id:#}", new ErrorObject()).as(Friend.class);
} catch (Exception e) {
assertThat(e).isInstanceOf(IllegalArgumentException.class);
assertThat(e.getCause()).isInstanceOf(MarshallingException.class);
assertThat(e.getMessage()).contains("{id:#}");
}