RunJob { protected static String[] getBasePackagesToScanForDrivers() throws IOException { return MaraAnnotationUtil.INSTANCE.getBasePackagesToScan(SYSPROP_DRIVER_SCAN_PACKAGES, RESOURCE_DRIVER_SCAN_PACKAGES); }  static void main(String[] args); static final String SYSPROP_DRIVER_SCAN_PACKAGES; static final String RESOURCE_DRIVER_SCAN_PACKAGES; }
@Test public void testScanPackages_Resource() { String packages = "package1,package2,package3"; try { String[] result = RunJob.getBasePackagesToScanForDrivers(); assertNotNull(result); assertThat(result.length, equalTo(3)); assertThat(StringUtils.join(result, ","), equalTo(packages)); } catch (IOException e) { e.printStackTrace(); fail(e.getMessage()); } }
@Test public void testScanPackages_SystemProperty() { String packages = "package4,package5,package6"; System.setProperty(RunJob.SYSPROP_DRIVER_SCAN_PACKAGES, packages); try { String[] result = RunJob.getBasePackagesToScanForDrivers(); assertNotNull(result); assertThat(result.length, equalTo(3)); assertThat(StringUtils.join(result, ","), equalTo(packages)); } catch (IOException e) { e.printStackTrace(); fail(e.getMessage()); } }