Optimize java unit test building and execution