correlationFilter.setTo(expectedTo);
RuleDescription ruleDescription = new RuleDescription();
ruleDescription.setFilter(correlationFilter);
// Act
SubscriptionInfo created = service.createSubscription(
topicName,
new SubscriptionInfo("MySubscription")
.setDefaultRuleDescription(ruleDescription)).getValue();
RuleInfo ruleInfo = service.getRule(topicName, "MySubscription",
"$Default").getValue();
CorrelationFilter correlationFilterResult = (CorrelationFilter) ruleInfo
.getFilter();
// Assert
assertNotNull(created);
assertEquals("MySubscription", created.getName());
assertEquals(false, created.isRequiresSession());
assertEquals(true,
created.isDeadLetteringOnFilterEvaluationExceptions());
assertNotNull(created.getCreatedAt());
assertNotNull(created.getUpdatedAt());
assertNotNull(created.getAccessedAt());
assertNotNull(created.getAutoDeleteOnIdle());
assertNotNull(correlationFilterResult);
assertEquals(expectedCorrelationId,
correlationFilterResult.getCorrelationId());
assertEquals(expectedContentType,
correlationFilterResult.getContentType());