add unittest for Repository API