### Question:
TensorFlow { public static OpList loadLibrary(String filename) { TF_Library h = null; try { h = libraryLoad(filename); } catch (RuntimeException e) { throw new UnsatisfiedLinkError(e.getMessage()); } try { return libraryOpList(h); } finally { libraryDelete(h); } } private  TensorFlow(); static String version(); static OpList registeredOpList(); static OpList loadLibrary(String filename);  }### Answer:
@Test public void loadLibrary() { File customOpLibrary = Paths.get("").resolve("bazel-bin/libcustom_ops_test.so").toFile(); assumeTrue(customOpLibrary.exists()); try (Graph g = new Graph()) { try { g.opBuilder("MyTest", "MyTest").build(); fail("should not be able to construct graphs with unregistered ops"); } catch (IllegalArgumentException e) { } OpList opList = TensorFlow.loadLibrary(customOpLibrary.getAbsolutePath()); assertNotNull(opList); assertEquals(1, opList.getOpCount()); assertEquals(opList.getOpList().get(0).getName(), "MyTest"); g.opBuilder("MyTest", "MyTest").build(); } }