Added unit tests for #1