refactor LatchManagerFactorySpec