CurrentTenant { static void set(TenantId tenantId) { checkNotDefaultArg(tenantId, "A tenant ID must not be a default value."); threadLocal.set(tenantId); } private  CurrentTenant();   }
@Test @DisplayName("reject null value") void rejectNullValue() { assertThrows(NullPointerException.class, () -> CurrentTenant.set(nullRef())); }
@Test @DisplayName("reject default value") void rejectDefaultValue() { assertThrows(IllegalArgumentException.class, () -> CurrentTenant.set(TenantId.getDefaultInstance())); }