CascadingHelper { public CascadingHelper withTokensFor(Class... emittedClasses) { Collections.addAll(CLASSES_TO_BE_SERIALIZED, emittedClasses); return THE_HELPER; } protected  CascadingHelper(); @Deprecated static CascadingHelper get(); static FlowBuilder newBuilder(); static void setTestMode(); FlowConnector getFlowConnector(); FlowConnector getFlowConnector(Map<Object, Object> properties); CascadingHelper withTokensFor(Class... emittedClasses); CascadingHelper withTokensFor(Set<Class> emittedClasses);  }
@Test public void testWithTokensFor() throws Exception { Map<Object,Object> properties = CascadingHelper.get().withTokensFor(X.class, Y.class).getFlowConnector().getProperties(); String tokensString = (String) properties.get("cascading.serialization.tokens"); assertTrue(tokensString.contains(X.class.getName())); assertTrue(tokensString.contains(Y.class.getName())); properties = CascadingHelper.get().withTokensFor(X.class, Y.class, Z.class).getFlowConnector().getProperties(); tokensString = (String) properties.get("cascading.serialization.tokens"); assertTrue(tokensString.contains(X.class.getName())); assertTrue(tokensString.contains(Y.class.getName())); assertTrue(tokensString.contains(Z.class.getName())); }