SubZero { public static Config useAsGlobalSerializer(Config config) { return useAsGlobalSerializerInternal(config, Serializer.class); } private  SubZero(); static Config useAsGlobalSerializer(Config config); static Config useAsGlobalSerializer(Config config, Class<? extends AbstractGlobalUserSerializer> serializerClazz); static T useAsGlobalSerializer(T config); static T useAsGlobalSerializer(T config, Class<? extends AbstractGlobalUserSerializer> serializerClazz); static Config useForClasses(Config config, Class<?>...classes); static T useForClasses(T config, Class<?>...classes);  }
@Test public void givenGlobalSerializerConfigDoesNotExist_whenUseAsGlobalSerializer_thenNewSubZeroIsUsedAsGlobalSerializer() { Config config = new Config(); SubZero.useAsGlobalSerializer(config); assertEquals(Serializer.class.getName(), config.getSerializationConfig().getGlobalSerializerConfig().getClassName()); }
@Test public void givenGlobalSerializerConfigDoes_whenUseAsGlobalSerializer_thenNewSubZeroIsUsedAsGlobalSerializer() { Config config = new Config(); config.getSerializationConfig().setGlobalSerializerConfig(new GlobalSerializerConfig().setClassName("foo")); SubZero.useAsGlobalSerializer(config); assertEquals(Serializer.class.getName(), config.getSerializationConfig().getGlobalSerializerConfig().getClassName()); }