Store { public static String parseSubscriptionFrom(Subscription subscription) { if (subscription.getName().isEmpty() || subscription.getProject().isEmpty()) { throw new IllegalArgumentException( String.format("Missing arguments in subscription string: %s", subscription.toString())); } return String.format( "%s:%s:%s", subscription.getProject(), subscription.getName(), subscription.getExclude()); }  static List<Subscription> parseSubFromStr(String subscriptions); static List<Subscription> parseSubFromStrWithoutExclusions(String subscriptions); static String parseSubscriptionFrom(Subscription subscription); static Subscription convertStringToSubscription(String subscription); static boolean isSubscribedToFeatureSet(
      List<Subscription> subscriptions, String projectName, String featureSetName);  }
@Test public void shouldReturnStringBasedOnSubscription() { String actual1 = Store.parseSubscriptionFrom(allSubscriptions.get(2)); Subscription sub1 = allSubscriptions.get(2); String expected1 = sub1.getProject() + ":" + sub1.getName() + ":" + sub1.getExclude(); String actual2 = Store.parseSubscriptionFrom(allSubscriptions.get(3)); Subscription sub2 = allSubscriptions.get(3); String expected2 = sub2.getProject() + ":" + sub2.getName() + ":" + sub2.getExclude(); assertThat(actual1, equalTo(expected1)); assertThat(actual2, equalTo(expected2)); }