@Test public void getSubContextIdFrom() { String subidentifier = "12345"; Long subContextId = notificationSubscriptionContextFactoryTestObject.getSubContextIdFrom(subidentifier); assertEquals("Could not extract subContextId from '" + subidentifier + "'", Long.valueOf(subidentifier), subContextId); }
public Long getSubContextIdFrom(String subidentifier) { String subidentifierDelimiter = ":"; if (subidentifier.contains(subidentifierDelimiter)) { subidentifier = subidentifier.substring(0, subidentifier.indexOf(subidentifierDelimiter)); } return Long.valueOf(subidentifier); }
NotificationSubscriptionContextFactory { public Long getSubContextIdFrom(String subidentifier) { String subidentifierDelimiter = ":"; if (subidentifier.contains(subidentifierDelimiter)) { subidentifier = subidentifier.substring(0, subidentifier.indexOf(subidentifierDelimiter)); } return Long.valueOf(subidentifier); } }
NotificationSubscriptionContextFactory { public Long getSubContextIdFrom(String subidentifier) { String subidentifierDelimiter = ":"; if (subidentifier.contains(subidentifierDelimiter)) { subidentifier = subidentifier.substring(0, subidentifier.indexOf(subidentifierDelimiter)); } return Long.valueOf(subidentifier); }  }
NotificationSubscriptionContextFactory { public Long getSubContextIdFrom(String subidentifier) { String subidentifierDelimiter = ":"; if (subidentifier.contains(subidentifierDelimiter)) { subidentifier = subidentifier.substring(0, subidentifier.indexOf(subidentifierDelimiter)); } return Long.valueOf(subidentifier); }  NotificationSubscriptionContext createNotificationSubscriptionContext(Identity identity, SubscriptionContext subscriptionContext, PublisherData publisherData); Long getSubContextIdFrom(String subidentifier); ContextInfo createContextInfoFrom(SubscriptionContext subsContext); }
NotificationSubscriptionContextFactory { public Long getSubContextIdFrom(String subidentifier) { String subidentifierDelimiter = ":"; if (subidentifier.contains(subidentifierDelimiter)) { subidentifier = subidentifier.substring(0, subidentifier.indexOf(subidentifierDelimiter)); } return Long.valueOf(subidentifier); }  NotificationSubscriptionContext createNotificationSubscriptionContext(Identity identity, SubscriptionContext subscriptionContext, PublisherData publisherData); Long getSubContextIdFrom(String subidentifier); ContextInfo createContextInfoFrom(SubscriptionContext subsContext);  }