LPS-51439 Prevent over compiling for test-class and test-method