added some unit tests

Signed-off-by: Raf <7909000@gmail.com>