public static boolean load(final String library) {
        synchronized(lock) {
            final String path = Native.getPath(library);
            try {
                // Load using absolute path. Otherwise we may load
                // a library in java.library.path that was not intended
                // because of a naming conflict.
                System.load(path);
                return true;
            }
            catch(UnsatisfiedLinkError e) {
                log.warn(String.format("Failed to load %s:%s", path, e.getMessage()), e);
                try {
                    System.loadLibrary(library);
                    return true;
                }
                catch(UnsatisfiedLinkError f) {
                    log.warn(String.format("Failed to load %s:%s", library, e.getMessage()), e);
                    return false;
                }
            }
        }
    }
@Test
    public void testLoad() {
        assertFalse(Native.load("notfound"));
    }