Add monitor tests

Fix #48