@Test public void register() { ChangeLogSerializerFactory.getInstance().getSerializers().clear(); assertEquals(0, ChangeLogSerializerFactory.getInstance().getSerializers().size()); ChangeLogSerializerFactory.getInstance().register(new MockChangeLogSerializer("mock")); assertEquals(1, ChangeLogSerializerFactory.getInstance().getSerializers().size()); }
public void register(ChangeLogSerializer changeLogSerializer) { for (String extension : changeLogSerializer.getValidFileExtensions()) { serializers.put(extension, changeLogSerializer); } }
ChangeLogSerializerFactory { public void register(ChangeLogSerializer changeLogSerializer) { for (String extension : changeLogSerializer.getValidFileExtensions()) { serializers.put(extension, changeLogSerializer); } } }
ChangeLogSerializerFactory { public void register(ChangeLogSerializer changeLogSerializer) { for (String extension : changeLogSerializer.getValidFileExtensions()) { serializers.put(extension, changeLogSerializer); } } private  ChangeLogSerializerFactory(); }
ChangeLogSerializerFactory { public void register(ChangeLogSerializer changeLogSerializer) { for (String extension : changeLogSerializer.getValidFileExtensions()) { serializers.put(extension, changeLogSerializer); } } private  ChangeLogSerializerFactory(); static void reset(); static ChangeLogSerializerFactory getInstance(); Map<String, ChangeLogSerializer> getSerializers(); ChangeLogSerializer getSerializer(String fileNameOrExtension); void register(ChangeLogSerializer changeLogSerializer); void unregister(ChangeLogSerializer changeLogSerializer); }
ChangeLogSerializerFactory { public void register(ChangeLogSerializer changeLogSerializer) { for (String extension : changeLogSerializer.getValidFileExtensions()) { serializers.put(extension, changeLogSerializer); } } private  ChangeLogSerializerFactory(); static void reset(); static ChangeLogSerializerFactory getInstance(); Map<String, ChangeLogSerializer> getSerializers(); ChangeLogSerializer getSerializer(String fileNameOrExtension); void register(ChangeLogSerializer changeLogSerializer); void unregister(ChangeLogSerializer changeLogSerializer);  }