Path:     "/v2/user_provided_service_instances/my-instance-guid",
			Matcher:  testnet.RequestBodyMatcher(`{"credentials":{"host":"example.com","password":"******","user":"******"},"syslog_drain_url":"syslog://example.com"}`),
			Response: testnet.TestResponse{Status: http.StatusCreated},
		})

		ts, handler, repo := createUserProvidedServiceInstanceRepo(req)
		defer ts.Close()

		params := map[string]string{
			"host":     "example.com",
			"user":     "******",
			"password": "******",
		}
		serviceInstance := models.ServiceInstanceFields{}
		serviceInstance.Guid = "my-instance-guid"
		serviceInstance.Params = params
		serviceInstance.SysLogDrainUrl = "syslog://example.com"

		apiErr := repo.Update(serviceInstance)
		Expect(handler).To(testnet.HaveAllRequestsCalled())
		Expect(apiErr).NotTo(HaveOccurred())
	})

	It("TestUpdateUserProvidedServiceInstanceWithOnlyParams", func() {
		req := testapi.NewCloudControllerTestRequest(testnet.TestRequest{
			Method:   "PUT",
			Path:     "/v2/user_provided_service_instances/my-instance-guid",
			Matcher:  testnet.RequestBodyMatcher(`{"credentials":{"host":"example.com","password":"******","user":"******"}}`),
			Response: testnet.TestResponse{Status: http.StatusCreated},
		})