designHandle = sessionHandle.openDesign( fileName + "DesignToReloadLibrary.xml" ); design = (ReportDesign) designHandle.getModule( );
List filePaths = dumpDesignAndLibrariesToFile( fileNames ); String apiFilePath = (String) filePaths.get( 2 ); int lastSlash = apiFilePath.lastIndexOf( "/" ); String apiFileDir = ""; if ( lastSlash != -1 ) { apiFileDir = apiFilePath.substring( 0, lastSlash + 1 ); }  sessionHandle.setResourceFolder( apiFileDir );    String designFilePath = (String) filePaths.get( 0 ); designHandle = sessionHandle.openDesign( designFilePath );
	public void testReloadLibrary2( ) throws Exception	{		String fileName = getClassFolder( ) + INPUT_FOLDER;		sessionHandle = new DesignEngine( new DesignConfig( ) )				.newSessionHandle( null );		assertNotNull( sessionHandle );		sessionHandle.setResourceFolder( getClassFolder( ) + "/../api" //$NON-NLS-1$				+ INPUT_FOLDER );		designHandle = sessionHandle.openDesign( fileName				+ "DesignToReloadLibrary.xml" ); //$NON-NLS-1$		design = (ReportDesign) designHandle.getModule( );		libraryHandle = designHandle.getLibrary( "Lib1" ); //$NON-NLS-1$				assertNotNull( libraryHandle );		String location1 = libraryHandle.getModule( ).getLocation( );		sessionHandle.setResourceFolder( null );		designHandle.reloadLibrary( libraryHandle );		libraryHandle = designHandle.getLibrary( "Lib1" ); //$NON-NLS-1$		assertNotNull( libraryHandle );		String location2 = libraryHandle.getModule( ).getLocation( );		assertFalse( location1.equalsIgnoreCase( location2 ) );	}