Config config = new XmlConfig(TEST_CONFIG_FILE, logger);
InetAddress localHost = InetAddress.getLocalHost();
String userPart = "alice";
String domain = "sourceforge.net";
String password = "123";
SipURI sipURI = new SipURI("sip:sourceforge.net;lr");
int sipPort = 6060;
MediaMode mediaMode = MediaMode.echo;
boolean mediaDebug = true;
int rtpPort = 8002;
config.setLocalInetAddress(localHost);
config.setUserPart(userPart);
config.setDomain(domain);
config.setPassword(password);
config.setOutboundProxy(sipURI);
config.setSipPort(sipPort);
config.setMediaMode(mediaMode);
config.setMediaDebug(mediaDebug);
config.setRtpPort(rtpPort);
config.save();
config = new XmlConfig(TEST_CONFIG_FILE, logger);
assert localHost.equals(config.getLocalInetAddress());
assert userPart.equals(config.getUserPart());
assert domain.equals(config.getDomain());
assert password.equals(config.getPassword());
assert sipURI.toString().equals(config.getOutboundProxy().toString());
assert sipPort == config.getSipPort();
assert mediaMode == config.getMediaMode();
assert mediaDebug == config.isMediaDebug();
assert rtpPort == config.getRtpPort();
}