Revert "Revert "add tests""

This reverts commit 693578b07d9276e7294cf880e525cbd34ee5a9e2.