*/
public void testExactSubscribeKey() {
System.out.println("***QueryKeyFactoryTest: testExactSubscribeKey ...");
try {
SubscribeKey subscribeKey = new SubscribeKey(glob, "myOid", "EXACT");
assertEquals("", "myOid", subscribeKey.getOid());
System.out.println("SubscribeKey: " + subscribeKey.toXml());
QueryKeyData key = factory.readObject(subscribeKey.toXml());
assertEquals("", "myOid", key.getOid());
assertEquals("", KeyData.CONTENTMIME_DEFAULT, key.getContentMime());
assertEquals("", KeyData.CONTENTMIMEEXTENDED_DEFAULT, key.getContentMimeExtended());
assertEquals("", (String)null, key.getDomain());
assertEquals("", "EXACT", key.getQueryType());
assertEquals("", (String)null, key.getQueryString());
}
catch (Throwable e) {
System.out.println("Test failed: " + e.toString());
}
try {
SubscribeKey subscribeKey = new SubscribeKey(glob, "//myTag", Constants.XPATH);
subscribeKey.getData().setContentMime("AAA");
subscribeKey.getData().setContentMimeExtended("BBB");
subscribeKey.setDomain("CCC");
assertEquals("", "myOid", subscribeKey.getOid());
System.out.println("SubscribeKey: " + subscribeKey.toXml());
QueryKeyData key = factory.readObject(subscribeKey.toXml());
assertEquals("", (String)null, key.getOid());
assertEquals("", "AAA", key.getContentMime());
assertEquals("", "BBB", key.getContentMimeExtended());
assertEquals("", "CCC", key.getDomain());