private void createTXTRecords() throws TextParseException, IOException,
UnknownHostException {
final Name zone = Name.fromString(DnsSdTestHelper.REG_DOMAIN + ".");
final Name name = Name.fromString("_" + DnsSdTestHelper.REG_SCHEME + "._" + DnsSdTestHelper.PROTO, zone);
Update update = null;
final IServiceProperties properties = serviceInfo.getServiceProperties();
final Enumeration enumeration = properties.getPropertyNames();
while (enumeration.hasMoreElements()) {
final Object property = enumeration.nextElement();
final String key = property.toString();
final String value = (String) properties.getProperty(key).toString();
final Record record = Record.fromString(name, Type.TXT, DClass.IN,
serviceInfo.getTTL(), key + "=" + value, zone);
update = new Update(zone);
update.add(record);
}
final SimpleResolver resolver = new SimpleResolver(DnsSdTestHelper.DNS_SERVER);
resolver.setTCP(true);
resolver.setTSIGKey(new TSIG(DnsSdTestHelper.TSIG_KEY_NAME, DnsSdTestHelper.TSIG_KEY));
final Message response = resolver.send(update);