JAVA-576: Added test to ensure that findAndModify/findAndRemove uses the object class