- return NetconfUtil.createMessage(
- NetconfServerSessionNegotiatorFactory.class.getResourceAsStream("/server_hello.xml")).getDocument();
+ InputStream resourceAsStream = NetconfServerSessionNegotiatorFactory.class
+ .getResourceAsStream(SERVER_HELLO_XML_LOCATION);
+ Preconditions.checkNotNull(resourceAsStream, "Unable to load server hello message blueprint from %s",
+ SERVER_HELLO_XML_LOCATION);
+ return NetconfUtil.createMessage(resourceAsStream).getDocument();