Refactoring, add two unittest for /appointment/create