SnmpH3C { public void sendRequest(List<String> oidList) { prepare(); LOG.info("Adding oids into PDU..."); addOIDs2PDU(oidList); try { LOG.info("Sending userTarget..."); sendGetPDU(snmp, userTarget, pdu); } catch (Exception e) { LOG.error("Sending userTarget is failed"); } try { snmp.close(); } catch (IOException e) { LOG.error("Cannot close snmp"); } } SnmpH3C(H3CInfos h3CInfos); void sendRequest(List<String> oidList);  }
@Test public void testSendRequest() { List<String> oidList = new ArrayList<>(); oidList.add("1.3.6.1.2.1.1.5.0"); snmpH3C.sendRequest(oidList); }