add RevisionServiceTest and fix bugs in RevisionServiceImpl