Fix CLI test utilities in java6.