Added several unit testing & one system testing

Fixed a bug during writing tests: the undo for Uncomplete did not
function.