LPS-51439 Detect test.type base on java file rather than class file, so that we don't need to run compile before the detection