@Test
public void testGetLibraryInfoForCurrentlyRunningJDK() throws Exception {

    JdkLibraryInfoProviderStub libInfoProvider = new JdkLibraryInfoProviderStub(
            new File("../tycho-lib-detector/target/classes/"), new SilentLog());
    String javaHome = System.getProperty("java.home");
    LibraryInfo libraryInfo = libInfoProvider.getLibraryInfo(javaHome);
    assertEquals(System.getProperty("java.version"), libraryInfo.getVersion());
    String expectedBootclasspath = getExpectedBootclasspath(javaHome);
    assertEquals(expectedBootclasspath, String.join(File.pathSeparator, libraryInfo.getBootpath()));
    String javaExtDirs = System.getProperty("java.ext.dirs");
    if (javaExtDirs != null) {
        assertEquals(javaExtDirs, String.join(File.pathSeparator, libraryInfo.getExtensionDirs()));
    }
    String javaEndorsedDirs = System.getProperty("java.endorsed.dirs");
    if (javaExtDirs != null) {
        assertEquals(javaEndorsedDirs, String.join(File.pathSeparator, libraryInfo.getEndorsedDirs()));
    }
}