add mockito dependency
change codeformat name
change format
forked test code from hadoop metric2 package