const discoveryPath … const jsonAccept … const protobufAccept … const aggregatedV2Beta1AcceptSuffix … const aggregatedAcceptSuffix … const aggregatedV2Beta1JSONAccept … const aggregatedV2Beta1ProtoAccept … const aggregatedJSONAccept … const aggregatedProtoAccept … func fetchPath(handler http.Handler, path, accept string) string { … } type fakeHTTPHandler … func (f fakeHTTPHandler) ServeHTTP(resp http.ResponseWriter, req *http.Request) { … } func TestAggregationEnabled(t *testing.T) { … }