func TestInvokeValidId(t *testing.T) {
	flowTest := testdata.NewFlowTest()
	flowTest.ConfigureForInit()
	router := NewRouter(flowTest.AppCtx, flowTest.RegistrationService, flowTest.RenderingService)
	flowTest.ConfigureForInvoke(context.Background(), createInvoke("InvokeA"))
	responseRecorder := makeTestRequest(t, router, httptest.NewRequest("GET", "/runtime/invocation/next", nil))
	assert.Equal(t, http.StatusOK, responseRecorder.Code)
	responseRecorder = makeTestRequest(t, router, httptest.NewRequest("POST", "/runtime/invocation/InvokeA/response", bytes.NewReader([]byte("{}"))))
	assert.Equal(t, http.StatusAccepted, responseRecorder.Code)
	flowTest.ConfigureForInvoke(context.Background(), createInvoke("InvokeB"))
	responseRecorder = makeTestRequest(t, router, httptest.NewRequest("GET", "/runtime/invocation/next", nil))
	assert.Equal(t, http.StatusOK, responseRecorder.Code)
	responseRecorder = makeTestRequest(t, router, httptest.NewRequest("POST", "/runtime/invocation/InvokeB/error", bytes.NewReader([]byte("{}"))))
	assert.Equal(t, http.StatusAccepted, responseRecorder.Code)
}
Verify that state machine will accept response and error with valid invoke id
package rapi
import (
	"bytes"
	"context"
	"net/http"
	"net/http/httptest"
	"testing"
	"github.com/stretchr/testify/assert"
	"go.amzn.com/lambda/testdata"
)