    @Test
    public void test_update_fails_when_transient_auto_enrollment_without_secret() throws Exception {

        // given transient service with secret exists
        transient_service_with_secret_exist_in_database();

        // when user gives auto enrollment without secret
        UpdateServiceInstanceRequest updateRequest = getUpdateRequestWithArbitraryParams(
                singletonMap(Config.ServiceInstanceParameters.AUTO_ENROLLMENT,
                        Enrollment.standard.name()));

        // then error is thrown
        verifyThrown(() -> instanceService.updateServiceInstance(updateRequest), InvalidParameterException.class,
                parameterChecked -> assertThat(parameterChecked.getParameterName(),
                        is(equalTo(Config.ServiceInstanceParameters.AUTO_ENROLLMENT))));
    }