@Test public void testRemoveTrivialEntry() throws Exception { String snmpConfigXml = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n" + "<snmp-config retry=\"3\" timeout=\"800\" read-community=\"public\" write-community=\"private\" xmlns=\"http: " <definition version=\"v2c\">\n" + " <specific>192.168.1.30</specific>\n" + " <specific>10.1.1.1</specific>\n" + " </definition>\n" + "</snmp-config>\n" + ""; String expectedConfig = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n" + "<snmp-config retry=\"3\" timeout=\"800\" read-community=\"public\" write-community=\"private\" xmlns=\"http: " <definition version=\"v2c\">\n" + " <specific>10.1.1.1</specific>\n" + " </definition>\n" + "</snmp-config>\n" + ""; SnmpPeerFactory.setInstance(new SnmpPeerFactory(snmpConfigXml)); assertXmlEquals(snmpConfigXml, SnmpPeerFactory.marshallConfig()); SnmpEventInfo info = new SnmpEventInfo(); info.setFirstIPAddress("192.168.1.30"); SnmpPeerFactory.getInstance().define(info); String actualConfig = SnmpPeerFactory.marshallConfig(); assertXmlEquals(expectedConfig, actualConfig); }
public void setFirstIPAddress(String firstIPAddress) throws UnknownHostException { m_firstIPAddress = firstIPAddress; }
SnmpEventInfo { public void setFirstIPAddress(String firstIPAddress) throws UnknownHostException { m_firstIPAddress = firstIPAddress; } }
SnmpEventInfo { public void setFirstIPAddress(String firstIPAddress) throws UnknownHostException { m_firstIPAddress = firstIPAddress; } SnmpEventInfo();  SnmpEventInfo(Event event); }
SnmpEventInfo { public void setFirstIPAddress(String firstIPAddress) throws UnknownHostException { m_firstIPAddress = firstIPAddress; } SnmpEventInfo();  SnmpEventInfo(Event event); String getCommunityString(); void setCommunityString(String communityString); String getFirstIPAddress(); void setFirstIPAddress(String firstIPAddress); void setFirstIPAddress(InetAddress firstIPAddress); String getLastIPAddress(); void setLastIPAddress(String lastIPAddress); void setLastIPAddress(InetAddress lastIPAddress); Range getRange(); int getRetryCount(); void setRetryCount(int retryCount); int getTimeout(); void setTimeout(int timeout); String getVersion(); void setVersion(String version); int getPort(); void setPort(int port); Definition createDef(); boolean isSpecific(); String toString(); }
SnmpEventInfo { public void setFirstIPAddress(String firstIPAddress) throws UnknownHostException { m_firstIPAddress = firstIPAddress; } SnmpEventInfo();  SnmpEventInfo(Event event); String getCommunityString(); void setCommunityString(String communityString); String getFirstIPAddress(); void setFirstIPAddress(String firstIPAddress); void setFirstIPAddress(InetAddress firstIPAddress); String getLastIPAddress(); void setLastIPAddress(String lastIPAddress); void setLastIPAddress(InetAddress lastIPAddress); Range getRange(); int getRetryCount(); void setRetryCount(int retryCount); int getTimeout(); void setTimeout(int timeout); String getVersion(); void setVersion(String version); int getPort(); void setPort(int port); Definition createDef(); boolean isSpecific(); String toString();  }