ISPN-5089 Store divisors in a temporary variable to avoid java.lang.ArithmeticException: / by zero
Test that replaying a prepare command doesn't acquire the lock twice