Add tests for CannotApplyException.
Add tests for DuplicateMigrationName exception.