import org.xml.sax.SAXException;
public class AbstractNetconfOperationTest {
-
- class NetconfOperationImpl extends AbstractNetconfOperation {
-
+ static class NetconfOperationImpl extends AbstractNetconfOperation {
public boolean handleRun;
- protected NetconfOperationImpl(String netconfSessionIdForReporting) {
+ protected NetconfOperationImpl(final String netconfSessionIdForReporting) {
super(netconfSessionIdForReporting);
this.handleRun = false;
}
}
@Override
- protected Element handle(Document document, XmlElement message,
- NetconfOperationChainedExecution subsequentOperation) throws DocumentedException {
+ protected Element handle(final Document document, final XmlElement message,
+ final NetconfOperationChainedExecution subsequentOperation) throws DocumentedException {
this.handleRun = true;
try {
return XmlUtil.readXmlToElement("<element/>");
} catch (SAXException | IOException e) {
- throw new RuntimeException(e);
+ throw DocumentedException.wrap(e);
}
}
}
- private NetconfOperationImpl netconfOperation;
+ private final NetconfOperationImpl netconfOperation = new NetconfOperationImpl("str");
private NetconfOperationChainedExecution operation;
@Before
public void setUp() throws Exception {
- netconfOperation = new NetconfOperationImpl("str");
operation = mock(NetconfOperationChainedExecution.class);
}