### Question:
XMvnHomeClassLoader extends IsolatedClassRealm { public Path getHome() { return home; } XMvnHomeClassLoader( ClassLoader parent );  XMvnHomeClassLoader( Path home, ClassLoader parent ); Path getHome();  }### Answer:
@Test public void testHome() throws Exception { try (XMvnHomeClassLoader loader = new XMvnHomeClassLoader( resourceDir, null )) { assertEquals( resourceDir, loader.getHome() ); } }
@Test public void testHomeProperty() throws Exception { String saved = System.getProperty( "xmvn.home" ); try { System.setProperty( "xmvn.home", resourceDir.toString() ); try (XMvnHomeClassLoader loader = new XMvnHomeClassLoader( null )) { assertEquals( resourceDir, loader.getHome() ); } } finally { if ( saved != null ) System.setProperty( "xmvn.home", saved ); } }