Mock objects for testing java systems