Add tests (update issue 415)