question: private static String rootTestClassName ( String originalClassName ) { int periodIndex = originalClassName . lastIndexOf ( '.' ) ; if ( periodIndex != - 1 ) { return originalClassName . substring ( 0 , periodIndex ) + ".generatedcode" + originalClassName . substring ( periodIndex ) ; } else { return "com.example.test.generatedcode.Test" ; } }
target:  Creates a unique test class name. Once no longer referenced, it can subsequently be reused, to keep compiler errors and stack traces cleaner.