TRUNK-3944: Incorrect mockito, hamcrest and junit dependencies
(cherry picked from commit 11ba1107fda8d88cf295456e05ff4a89a0b7b785)
TRUNK-3944: Updated junit to 4.11 and fixed tests
(cherry picked from commit 117174655d5e01e1d19b5815c8dd3bcde113c8f0)