Change deprecated mock() to double()

* Fix code alignment