MODIFIED: all .java . Add Mockito test for the version 1