Add return code integration tests