private void setTestType(final ReportOptions data) {
    final TestGroupConfig conf =
        new TestGroupConfig(this.mojo.getExcludedGroups(), this.mojo.getIncludedGroups());
    final ConfigurationFactory configFactory =
        new ConfigurationFactory(conf, new ClassPathByteArraySource(data.getClassPath()));

    data.setGroupConfig(conf);
    data.setConfiguration(configFactory.createConfiguration());
  }
 @Test
 public void shouldHandleNotCanonicalLaunchClasspathElements() {
   final String oldClasspath = System.getProperty(JAVA_CLASS_PATH_PROPERTY);
   try {
     // given
     final PluginServices plugins = PluginServices.makeForContextLoader();
     this.testee = new OptionsParser(new PluginFilter(plugins));
     // and
     System.setProperty(JAVA_CLASS_PATH_PROPERTY, getNonCanonicalGregorEngineClassPath());
     // when
     final ReportOptions actual = parseAddingRequiredArgs("--includeLaunchClasspath=false");
     // then
     assertThat(actual.getClassPath().findClasses(gregorClass())).hasSize(1);
   } finally {
     System.setProperty(JAVA_CLASS_PATH_PROPERTY, oldClasspath);
   }
 }