minor changes to support testing
added jmockit
added test cases for issue #82