#287 Unit tests