test hook java