def test_instantiates_without_payload(self):
        request = MethodRequest(request_id=dummy_rid,
                                name=dummy_name,
                                payload=dummy_payload)
        status = 200
        response = MethodResponse.create_from_method_request(request, status)

        assert isinstance(response, MethodResponse)
        assert response.request_id == request.request_id
        assert response.status == status
        assert response.payload is None
    def test_instantiates_from_method_request(self):
        request = MethodRequest(request_id=dummy_rid,
                                name=dummy_name,
                                payload=dummy_payload)
        status = 200
        payload = {"ResponsePayload": "SomeResponse"}
        response = MethodResponse.create_from_method_request(
            method_request=request, status=status, payload=payload)

        assert isinstance(response, MethodResponse)
        assert response.request_id == request.request_id
        assert response.status == status
        assert response.payload == payload