"30 " +
				"23 " +
				`"FakeReferer" ` +
				`"FakeUserAgent" ` +
				`"FakeRemoteAddr" ` +
				`"1.2.3.4:1234" ` +
				`x_forwarded_for:"FakeProxy1, FakeProxy2" ` +
				`x_forwarded_proto:"FakeOriginalRequestProto" ` +
				`vcap_request_id:"abc-123-xyz-pdq" ` +
				`response_time:60 ` +
				`app_id:"FakeApplicationId" ` +
				`app_index:"3"` +
				"\n"

			b := new(bytes.Buffer)
			_, err := record.WriteTo(b)
			Expect(err).ToNot(HaveOccurred())
			Expect(b.String()).To(Equal(recordString))
		})
	})

	Describe("ApplicationID", func() {
		var emptyRecord schema.AccessLogRecord
		Context("when RouteEndpoint is nil", func() {
			BeforeEach(func() {
				emptyRecord.RouteEndpoint = new(route.Endpoint)
			})
			It("returns empty string", func() {
				Expect(emptyRecord.ApplicationID()).To(Equal(""))
			})
		})