Added tests. ref #221