FileBasedTenantService implements TenantService, TenantManagementService, Lifecycle { @Override public Future<OperationResult<Void>> updateTenant(final String tenantId, final Tenant tenantSpec, final Optional<String> expectedResourceVersion, final Span span) { Objects.requireNonNull(tenantId); Objects.requireNonNull(tenantSpec); return Future.succeededFuture(update(tenantId, tenantSpec, expectedResourceVersion, span)); } @Autowired  FileBasedTenantService(final Vertx vertx); @Autowired void setConfig(final FileBasedTenantsConfigProperties configuration); @Override Future<Void> start(); @Override Future<Void> stop(); @Override Future<TenantResult<JsonObject>> get(final String tenantId); @Override Future<TenantResult<JsonObject>> get(final String tenantId, final Span span); @Override Future<TenantResult<JsonObject>> get(final X500Principal subjectDn); @Override Future<OperationResult<Tenant>> readTenant(final String tenantId, final Span span); @Override Future<TenantResult<JsonObject>> get(final X500Principal subjectDn, final Span span); @Override Future<Result<Void>> deleteTenant(final String tenantId, final Optional<String> resourceVersion,
            final Span span); @Override Future<OperationResult<Id>> createTenant(final Optional<String> tenantId, final Tenant tenantSpec,
            final Span span); @Override Future<OperationResult<Void>> updateTenant(final String tenantId, final Tenant tenantSpec,
            final Optional<String> expectedResourceVersion,
            final Span span); OperationResult<Void> update(
            final String tenantId,
            final Tenant tenantSpec,
            final Optional<String> expectedResourceVersion,
            final Span span); void clear(); @Override String toString();  }
@Test public void testUpdateTenantsFailsIfModificationIsDisabled(final VertxTestContext ctx) { props.setModificationEnabled(false); svc.updateTenant( "tenant", new Tenant(), null, NoopSpan.INSTANCE) .onComplete(ctx.succeeding(s -> { ctx.verify(() -> { assertThat(s.getStatus()).isEqualTo(HttpURLConnection.HTTP_FORBIDDEN); }); ctx.completeNow(); })); }