Added tests to (remove|find)_transition

Added defensive programming approach into find_transition