Add tests for issues which can be closed

Closes #5275, $4547