Implemented tests for #4