- @SuppressWarnings("checkstyle:illegalCatch")
- public void testToYangInstanceIdentifierBlocking() {
- this.codec.onGlobalContextUpdated(new EmptySchemaContext());
-
- final CountDownLatch done = new CountDownLatch(1);
- final AtomicReference<YangInstanceIdentifier> yangId = new AtomicReference<>();
- final AtomicReference<RuntimeException> error = new AtomicReference<>();
- new Thread(() -> {
- try {
- yangId.set(BindingNormalizedCodecTest.this.codec.toYangInstanceIdentifierBlocking(BA_TOP_LEVEL_LIST));
- } catch (final RuntimeException e) {
- error.set(e);
- } finally {
- done.countDown();
- }
- }).start();
-
- Uninterruptibles.sleepUninterruptibly(500, TimeUnit.MILLISECONDS);
- this.codec.onGlobalContextUpdated(this.context);
-
- assertTrue("toYangInstanceIdentifierBlocking completed",
- Uninterruptibles.awaitUninterruptibly(done, 3, TimeUnit.SECONDS));
- if (error.get() != null) {
- throw error.get();
- }
-
- assertEquals("toYangInstanceIdentifierBlocking", BI_TOP_LEVEL_LIST, yangId.get());
- }
-
- @Test
- public void testGetRpcMethodToSchemaPathWithNoInitialSchemaContext() {
- testGetRpcMethodToSchemaPath();
- }
-
- @Test
- public void testGetRpcMethodToSchemaPathBlocking() {
- this.codec.onGlobalContextUpdated(new EmptySchemaContext());
- testGetRpcMethodToSchemaPath();
+ public void testGetRpcMethodToQName() {
+ final List<String> retMap = serializer
+ .getRpcMethodToQName(OpendaylightTestRpcServiceService.class).keySet().stream()
+ .map(Method::getName)
+ .collect(Collectors.toList());
+ assertTrue(retMap.contains("rockTheHouse"));