Issue 24: unit tests