getFactory shouldn't throw. Use a RuntimeException instead.