fos.close();
assertTrue(libraryFile.exists());
assertTrue(libraryFile.length() > 0);
MLet mlet = new MLet(new URL[]{libraryFile.getCanonicalFile().getParentFile().toURL()});
// Set the library directory to some temp directory
File temp = File.createTempFile("abc", null);
temp.deleteOnExit();
mlet.setLibraryDirectory(temp.getCanonicalFile().getParentFile().getCanonicalPath());
Method method = mlet.getClass().getDeclaredMethod("findLibrary", new Class[]{String.class});
method.setAccessible(true);
String result = (String)method.invoke(mlet, new Object[]{library});
assertNotNull(result);
assertTrue(libraryFile.exists());
assertTrue(libraryFile.length() > 0);
File tempLibrary = new File(mlet.getLibraryDirectory(), libraryName);
assertTrue(tempLibrary.exists());
assertTrue(tempLibrary.length() > 0);
}