add unittest for cors middleware