replace create with new in TransitionTest and fix bugs