Add tests for #302