- private void registerRuntimeBean() {
- BaseJMXRegistrator baseJMXRegistrator = new BaseJMXRegistrator(ManagementFactory.getPlatformMBeanServer());
- RootRuntimeBeanRegistratorImpl runtimeBeanRegistrator = baseJMXRegistrator
- .createRuntimeBeanRegistrator(new ModuleIdentifier(NetconfTestImplModuleFactory.NAME, "instance"));
- NetconfTestImplRuntimeRegistrator reg = new NetconfTestImplRuntimeRegistrator(runtimeBeanRegistrator);
- reg.register(new NetconfTestImplRuntimeMXBean() {
- @Override
- public Asdf getAsdf() {
- return null;
- }
-
- @Override
- public Long getCreatedSessions() {
- return null;
- }
-
- @Override
- public String noArg(String arg1) {
- return "from no arg";
- }
- });
- }
-
- @Test
-// @Ignore
- public void testStartExi() throws Exception {
- try (NetconfClient netconfClient = createSession(tcpAddress, "1")) {
-
-
- Document rpcReply = netconfClient.sendMessage(this.startExi)
- .getDocument();
- assertIsOK(rpcReply);
-
- ExiParameters exiParams = new ExiParameters();
- exiParams.setParametersFromXmlElement(XmlElement.fromDomDocument(this.startExi.getDocument()));
-
- netconfClient.getClientSession().addExiDecoder(ExiDecoderHandler.HANDLER_NAME, new ExiDecoderHandler(exiParams));
- netconfClient.getClientSession().addExiEncoder(ExiEncoderHandler.HANDLER_NAME, new ExiEncoderHandler(exiParams));
-
- rpcReply = netconfClient.sendMessage(this.editConfig)
- .getDocument();
- assertIsOK(rpcReply);
-
- rpcReply = netconfClient.sendMessage(this.stopExi)
- .getDocument();
- assertIsOK(rpcReply);
-
- }
- }
-