RCLJava { public static boolean isInitialized() { return RCLJava.initialized; } private  RCLJava(); static void rclJavaInit(final String... args); static boolean isInitialized(); static Node createNode(final String defaultName); static Node createNode(final String namespace, final String defaultName); static void spinOnce(final Node node); static void spin(final Node node); static boolean ok(); static void shutdown(); static String getRMWIdentifier(); static String getTypesupportIdentifier(); @SuppressWarnings("PMD.AvoidUsingNativeCode") static void setRMWImplementation(final String rmwImplementation); @SuppressWarnings("PMD.AvoidUsingNativeCode") static void loadLibrary(final String name); static long convertQoSProfileToHandle(final QoSProfile qosProfile); static void disposeQoSProfile(final long qosProfileHandle);  }
@Test public final void testInit() { logger.debug(new Object(){}.getClass().getEnclosingMethod().getName()); boolean test = true; try { Assert.assertEquals(false, RCLJava.isInitialized()); this.initRCLjava(); Assert.assertEquals(true, RCLJava.isInitialized()); } catch (Exception e) { test = false; } finally { this.releaseRCLjava(); } Assert.assertTrue("failed to initialize rclJava", test); }