Unit tests for #241