simplify mock methods
optmize memory for mocking and whitespace
fix Mock for jruby