Tenant { @JsonIgnore public final boolean isEnabled() { return Optional.ofNullable(enabled).orElse(true); }  @JsonIgnore final boolean isValid(); @JsonIgnore final Tenant setEnabled(final boolean enabled); @JsonIgnore final boolean isEnabled(); final Tenant setExtensions(final Map<String, Object> extensions); final Tenant putExtension(final String key, final Object value); final Map<String, Object> getExtensions(); final Tenant setDefaults(final Map<String, Object> defaults); final Map<String, Object> getDefaults(); final Tenant setAdapters(final List<Adapter> adapters); final List<Adapter> getAdapters(); final Tenant addAdapterConfig(final Adapter configuration); final Integer getMinimumMessageSize(); final Tenant setMinimumMessageSize(final Integer minimumMessageSize); final ResourceLimits getResourceLimits(); final Tenant setResourceLimits(final ResourceLimits resourceLimits); final TenantTracingConfig getTracing(); final Tenant setTracing(final TenantTracingConfig tracing); List<TrustedCertificateAuthority> getTrustedCertificateAuthorities(); Tenant setTrustedCertificateAuthorities(final List<TrustedCertificateAuthority> trustedCertificateAuthorities); @JsonIgnore Set<X500Principal> getTrustedCertificateAuthoritySubjectDNs(); boolean hasTrustedCertificateAuthoritySubjectDN(final X500Principal subjectDn);  }
@Test public void testDecodeDefault() { final var tenant = new JsonObject().mapTo(Tenant.class); assertNotNull(tenant); assertTrue(tenant.isEnabled()); }
@Test public void testDecodeDisabled() { final var tenant = new JsonObject().put(RegistryManagementConstants.FIELD_ENABLED, false).mapTo(Tenant.class); assertNotNull(tenant); assertFalse(tenant.isEnabled()); }
@Test public void testDecodeEnabled() { final var tenant = new JsonObject().put(RegistryManagementConstants.FIELD_ENABLED, true).mapTo(Tenant.class); assertNotNull(tenant); assertTrue(tenant.isEnabled()); }