Added unittest for basic usage cases.