Java Code Examples for java.util.List#of()

The following examples show how to use java.util.List#of() . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may want to check out the right sidebar which shows the related API usage.
Example 1
Source Project: crate   File: PgExpandArray.java    License: Apache License 2.0 6 votes vote down vote up
@Override
@SafeVarargs
public final Iterable<Row> evaluate(TransactionContext txnCtx, Input<List<Object>>... args) {
    List<Object> values = args[0].value();
    if (values == null) {
        return List.of();
    }
    return () -> values.stream()
        .map(new Function<Object, Row>() {

            final Object[] columns = new Object[2];
            final RowN row = new RowN(columns);

            int idx = 0;

            @Override
            public Row apply(Object val) {
                idx++;
                columns[0] = val;
                columns[1] = idx;
                return row;
            }
        }).iterator();
}
 
Example 2
Source Project: nuls-v2   File: ChainManager.java    License: MIT License 6 votes vote down vote up
/**
 * 注册智能合约交易
 * */
public void registerContractTx(){
    for (Chain chain:chainMap.values()) {
        /*
         * 注册智能合约交易
         * Chain Trading Registration
         * */
        int chainId = chain.getConfig().getChainId();
        List<CmdRegisterDto> cmdRegisterDtoList = new ArrayList<>();
        CmdRegisterDto createAgentDto = new CmdRegisterDto("cs_createContractAgent", 0, List.of("packingAddress", "deposit", "commissionRate"), 1);
        CmdRegisterDto depositDto = new CmdRegisterDto("cs_contractDeposit", 0, List.of("agentHash", "deposit"), 1);
        CmdRegisterDto stopAgentDto = new CmdRegisterDto("cs_stopContractAgent", 0, List.of(), 1);
        CmdRegisterDto cancelDepositDto = new CmdRegisterDto("cs_contractWithdraw", 0, List.of("joinAgentHash"), 1);
        CmdRegisterDto searchAgentInfo = new CmdRegisterDto("cs_getContractAgentInfo", 1, List.of("agentHash"), 1);
        CmdRegisterDto searchDepositInfo = new CmdRegisterDto("cs_getContractDepositInfo", 1, List.of("joinAgentHash"), 1);
        cmdRegisterDtoList.add(cancelDepositDto);
        cmdRegisterDtoList.add(createAgentDto);
        cmdRegisterDtoList.add(stopAgentDto);
        cmdRegisterDtoList.add(depositDto);
        cmdRegisterDtoList.add(searchAgentInfo);
        cmdRegisterDtoList.add(searchDepositInfo);
        CallMethodUtils.registerContractTx(chainId, cmdRegisterDtoList);
    }
}
 
Example 3
Source Project: milkman   File: ExecRequest.java    License: MIT License 5 votes vote down vote up
@Override
protected List<Option> createOptions() {
	return List.of(
			new Option("less", "l", "outputs response into less"),
			new Option("verbose", "v", "outputs all aspects")
	);
}
 
Example 4
Source Project: styx   File: FutureUtilTest.java    License: Apache License 2.0 5 votes vote down vote up
@Test
public void gatherIOShouldPropagateTimeoutAsIOException() throws IOException {
  var futures = List.of(completedFuture("foo"), future);
  exception.expect(IOException.class);
  exception.expectCause(instanceOf(TimeoutException.class));
  FutureUtil.gatherIO(futures, TIMED_OUT);
}
 
Example 5
@Test
public void testCheckIfThereIsEventInQueues() {
    List<FlowChainLog> flowChains = List.of(
            flowChainLog("1", true, 1L),
            flowChainLog("1", true, 2L),
            flowChainLog("2", true, 1L),
            flowChainLog("2", false, 2L)
    );
    assertTrue(underTest.hasEventInFlowChainQueue(flowChains));
}
 
Example 6
Source Project: vespa   File: ConfigServerBootstrapTest.java    License: Apache License 2.0 5 votes vote down vote up
@Test
public void testBootstrap() throws Exception {
    ConfigserverConfig configserverConfig = createConfigserverConfig(temporaryFolder);
    InMemoryProvisioner provisioner = new InMemoryProvisioner(true, "host0", "host1", "host3", "host4");
    DeployTester tester = new DeployTester(List.of(createHostedModelFactory()), configserverConfig, provisioner);
    tester.deployApp("src/test/apps/hosted/");

    File versionFile = temporaryFolder.newFile();
    VersionState versionState = new VersionState(versionFile);
    assertTrue(versionState.isUpgraded());

    RpcServer rpcServer = createRpcServer(configserverConfig);
    // Take a host away so that there are too few for the application, to verify we can still bootstrap
    provisioner.allocations().values().iterator().next().remove(0);
    StateMonitor stateMonitor = new StateMonitor();
    VipStatus vipStatus = createVipStatus(stateMonitor);
    ConfigServerBootstrap bootstrap = new ConfigServerBootstrap(tester.applicationRepository(), rpcServer,
                                                                versionState, stateMonitor,
                                                                vipStatus, INITIALIZE_ONLY, VIP_STATUS_PROGRAMMATICALLY);
    assertFalse(vipStatus.isInRotation());
    bootstrap.start();
    waitUntil(rpcServer::isRunning, "failed waiting for Rpc server running");
    waitUntil(() -> bootstrap.status() == StateMonitor.Status.up, "failed waiting for status 'up'");
    waitUntil(vipStatus::isInRotation, "failed waiting for server to be in rotation");

    bootstrap.deconstruct();
    assertEquals(StateMonitor.Status.down, bootstrap.status());
    assertFalse(rpcServer.isRunning());
    assertFalse(vipStatus.isInRotation());
}
 
Example 7
@Override
protected List<ApiClusterTemplateConfig> getRoleConfigs(String roleType, TemplatePreparationObject source) {
    switch (roleType) {
        case YarnRoles.RESOURCEMANAGER:
            return List.of(
                    config(CAPACITY_SCHEDULER_SAFETY_VALVE, ConfigUtils.getSafetyValveConfiguration(getCapacitySchedulerValveValue())),
                    config(CAPACITY_SCHEDULER_CLASS, "org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacityScheduler"));
        default:
            return List.of();
    }
}
 
Example 8
private Collection<FlowRule> buildExpectedFwdClassifierRule(PortNumber inPort,
                                                            MacAddress dstMac,
                                                            MacAddress dstMacMask,
                                                            short ethType,
                                                            byte fwdClass) {
    PiActionParam classParam = new PiActionParam(FabricConstants.FWD_TYPE,
                                                 ImmutableByteSequence.copyFrom(fwdClass));
    PiAction fwdClassifierAction = PiAction.builder()
            .withId(FabricConstants.FABRIC_INGRESS_FILTERING_SET_FORWARDING_TYPE)
            .withParameter(classParam)
            .build();
    TrafficTreatment treatment = DefaultTrafficTreatment.builder()
            .piTableAction(fwdClassifierAction)
            .build();

    TrafficSelector.Builder sbuilder = DefaultTrafficSelector.builder()
            .matchInPort(inPort);
    if (dstMacMask != null) {
        sbuilder.matchEthDstMasked(dstMac, dstMacMask);
    } else {
        sbuilder.matchEthDstMasked(dstMac, MacAddress.EXACT_MASK);
    }
    // Special case for MPLS UNICAST forwarding, need to build 2 rules for MPLS+IPv4 and MPLS+IPv6
    if (ethType == Ethernet.MPLS_UNICAST) {
        return buildExpectedFwdClassifierRulesMpls(fwdClassifierAction, treatment, sbuilder);
    }
    sbuilder.matchPi(PiCriterion.builder()
                             .matchExact(FabricConstants.HDR_IP_ETH_TYPE, ethType)
                             .build());
    TrafficSelector selector = sbuilder.build();
    return List.of(DefaultFlowRule.builder()
                           .withPriority(PRIORITY)
                           .withSelector(selector)
                           .withTreatment(treatment)
                           .fromApp(APP_ID)
                           .forDevice(DEVICE_ID)
                           .makePermanent()
                           .forTable(FabricConstants.FABRIC_INGRESS_FILTERING_FWD_CLASSIFIER)
                           .build());
}
 
Example 9
Source Project: teku   File: Eth1Data.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public List<Bytes> get_fixed_parts() {
  return List.of(
      SSZ.encode(writer -> writer.writeFixedBytes(getDeposit_root())),
      SSZ.encodeUInt64(getDeposit_count().longValue()),
      SSZ.encode(writer -> writer.writeFixedBytes(getBlock_hash())));
}
 
Example 10
Source Project: teku   File: BeaconBlockHeader.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public List<Bytes> get_fixed_parts() {
  return List.of(
      SSZ.encodeUInt64(getSlot().longValue()),
      SSZ.encodeUInt64(getProposer_index().longValue()),
      SSZ.encode(writer -> writer.writeFixedBytes(getParent_root())),
      SSZ.encode(writer -> writer.writeFixedBytes(getState_root())),
      SSZ.encode(writer -> writer.writeFixedBytes(getBody_root())));
}
 
Example 11
private List<MachineUser> getMachineUsers(String actorCrn, String accountId, Optional<String> requestIdOptional,
    boolean fullSync, Set<String> machineUserCrns) {
    if (fullSync) {
        return grpcUmsClient.listAllMachineUsers(actorCrn, accountId, requestIdOptional);
    } else if (!machineUserCrns.isEmpty()) {
        return grpcUmsClient.listMachineUsers(actorCrn, accountId, List.copyOf(machineUserCrns), requestIdOptional);
    } else {
        return List.of();
    }
}
 
Example 12
Source Project: crate   File: RelationName.java    License: Apache License 2.0 5 votes vote down vote up
public QualifiedName toQualifiedName() {
    if (schema == null) {
        return new QualifiedName(name);
    } else {
        return new QualifiedName(List.of(schema, name));
    }
}
 
Example 13
/**
 * Verifies that the <em>getCommandHandlingAdapterInstances</em> operation fails for a device with a non-empty set
 * of given viaGateways, if no matching instance has been registered.
 *
 * @param ctx The vert.x context.
 */
@Test
public void testGetCommandHandlingAdapterInstancesFailsWithGivenGateways(final VertxTestContext ctx) {
    final String deviceId = "testDevice";
    final String gatewayId = "gw-1";
    final List<String> viaGateways = List.of(gatewayId);
    svc.getCommandHandlingAdapterInstances(Constants.DEFAULT_TENANT, deviceId, viaGateways, span)
            .onComplete(ctx.succeeding(result -> ctx.verify(() -> {
                assertEquals(HttpURLConnection.HTTP_NOT_FOUND, result.getStatus());
                ctx.completeNow();
            })));
}
 
Example 14
Source Project: vividus   File: ElementNameSearch.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public List<WebElement> search(SearchContext searchContext, SearchParameters parameters)
{
    if (null != searchContext)
    {
        String elementName = parameters.getValue();
        return findElementsByText(searchContext,
                LocatorUtil.getXPathLocator(".//*[@*=%1$s or text()=%1$s]", elementName), parameters, "*");
    }
    return List.of();
}
 
Example 15
Source Project: tessera   File: SendRequestTest.java    License: Apache License 2.0 5 votes vote down vote up
@Test(expected = NullPointerException.class)
public void buildWithoutSender() {
    byte[] payload = "Payload".getBytes();

    List<PublicKey> recipients = List.of(mock(PublicKey.class));

    SendRequest.Builder.create()
        .withPayload(payload)
        .withRecipients(recipients)
        .build();
}
 
Example 16
Source Project: vespa   File: VespaModelFactoryTest.java    License: Apache License 2.0 4 votes vote down vote up
@Test
public void hostedVespaZoneApplicationAllocatesNodesFromNodeRepo() {
    String hostName = "test-host-name";
    String routingClusterName = "routing-cluster";

    String hosts =
            "<?xml version='1.0' encoding='utf-8' ?>\n" +
                    "<hosts>\n" +
                    "  <host name='" + hostName + "'>\n" +
                    "    <alias>proxy1</alias>\n" +
                    "  </host>\n" +
                    "</hosts>";

    String services =
            "<?xml version='1.0' encoding='utf-8' ?>\n" +
                    "<services version='1.0' xmlns:deploy='vespa'>\n" +
                    "    <admin version='2.0'>\n" +
                    "        <adminserver hostalias='proxy1' />\n" +
                    "    </admin>" +
                    "    <container id='" + routingClusterName + "' version='1.0'>\n" +
                    "        <nodes type='proxy'/>\n" +
                    "    </container>\n" +
                    "</services>";

    HostProvisioner provisionerToOverride = new HostProvisioner() {
        @Override
        public HostSpec allocateHost(String alias) {
            return new HostSpec(hostName,
                                NodeResources.unspecified(), NodeResources.unspecified(), NodeResources.unspecified(),
                                ClusterMembership.from(ClusterSpec.request(ClusterSpec.Type.admin, new ClusterSpec.Id(routingClusterName)).vespaVersion("6.42").build(), 0),
                                Optional.empty(), Optional.empty(), Optional.empty());
        }

        @Override
        public List<HostSpec> prepare(ClusterSpec cluster, Capacity capacity, ProvisionLogger logger) {
            return List.of(new HostSpec(hostName,
                                        NodeResources.unspecified(), NodeResources.unspecified(), NodeResources.unspecified(),
                                        ClusterMembership.from(ClusterSpec.request(ClusterSpec.Type.container, new ClusterSpec.Id(routingClusterName)).vespaVersion("6.42").build(), 0),
                                        Optional.empty(), Optional.empty(), Optional.empty()));
        }
    };

    ModelContext modelContext = createMockModelContext(hosts, services, provisionerToOverride);
    Model model = new VespaModelFactory(new NullConfigModelRegistry()).createModel(modelContext);

    List<HostInfo> allocatedHosts = new ArrayList<>(model.getHosts());
    assertThat(allocatedHosts.size(), is(1));
    HostInfo hostInfo = allocatedHosts.get(0);

    assertThat(hostInfo.getHostname(), is(hostName));
    assertTrue("Routing service should run on host " + hostName,
               hostInfo.getServices().stream()
                       .map(ServiceInfo::getConfigId)
                       .anyMatch(configId -> configId.contains(routingClusterName)));
}
 
Example 17
private <T> void handle(String topic, MessageProcess<T> process, List<ConsumerRecord<byte[], byte[]>> records, double longProcessThresholdInNano) {
    for (ConsumerRecord<byte[], byte[]> record : records) {
        ActionLog actionLog = logManager.begin("=== message handling begin ===");
        try {
            actionLog.action("topic:" + topic);
            actionLog.context("topic", topic);
            actionLog.context("handler", process.handler.getClass().getCanonicalName());
            actionLog.track("kafka", 0, 1, 0);

            Headers headers = record.headers();
            if ("true".equals(header(headers, MessageHeaders.HEADER_TRACE))) actionLog.trace = true;
            String correlationId = header(headers, MessageHeaders.HEADER_CORRELATION_ID);
            if (correlationId != null) actionLog.correlationIds = List.of(correlationId);
            String client = header(headers, MessageHeaders.HEADER_CLIENT);
            if (client != null) actionLog.clients = List.of(client);
            String refId = header(headers, MessageHeaders.HEADER_REF_ID);
            if (refId != null) actionLog.refIds = List.of(refId);
            logger.debug("[header] refId={}, client={}, correlationId={}", refId, client, correlationId);

            String key = key(record);
            actionLog.context("key", key);

            long timestamp = record.timestamp();
            logger.debug("[message] timestamp={}", timestamp);
            long lag = actionLog.date.toEpochMilli() - timestamp;
            actionLog.stat("consumer_lag_in_ms", lag);
            checkConsumerLag(lag, longConsumerLagThresholdInMs);

            byte[] value = record.value();
            logger.debug("[message] value={}", new BytesLogParam(value));
            T message = process.mapper.fromJSON(value);
            process.validator.validate(message, false);
            process.handler.handle(key, message);
        } catch (Throwable e) {
            logManager.logError(e);
        } finally {
            long elapsed = actionLog.elapsed();
            checkSlowProcess(elapsed, longProcessThresholdInNano);
            logManager.end("=== message handling end ===");
        }
    }
}
 
Example 18
Source Project: teku   File: AbstractDatabaseTest.java    License: Apache License 2.0 4 votes vote down vote up
protected void testShouldRecordFinalizedBlocksAndStates(
    final StateStorageMode storageMode,
    final boolean batchUpdate,
    Consumer<StateStorageMode> initializeDatabase)
    throws StateTransitionException {
  // Setup chains
  // Both chains share block up to slot 3
  final ChainBuilder primaryChain = ChainBuilder.create(VALIDATOR_KEYS);
  primaryChain.generateGenesis();
  primaryChain.generateBlocksUpToSlot(3);
  final ChainBuilder forkChain = primaryChain.fork();
  // Fork chain's next block is at 6
  forkChain.generateBlockAtSlot(6);
  forkChain.generateBlocksUpToSlot(7);
  // Primary chain's next block is at 7
  final SignedBlockAndState finalizedBlock = primaryChain.generateBlockAtSlot(7);
  final Checkpoint finalizedCheckpoint = getCheckpointForBlock(finalizedBlock.getBlock());
  final UnsignedLong pruneToSlot = finalizedCheckpoint.getEpochStartSlot();
  // Add some blocks in the next epoch
  final UnsignedLong hotSlot = pruneToSlot.plus(UnsignedLong.ONE);
  primaryChain.generateBlockAtSlot(hotSlot);
  forkChain.generateBlockAtSlot(hotSlot);

  // Setup database
  initializeDatabase.accept(storageMode);
  initGenesis();

  final Set<SignedBlockAndState> allBlocksAndStates =
      Streams.concat(primaryChain.streamBlocksAndStates(), forkChain.streamBlocksAndStates())
          .collect(Collectors.toSet());

  if (batchUpdate) {
    final StoreTransaction transaction = recentChainData.startStoreTransaction();
    add(transaction, allBlocksAndStates);
    justifyAndFinalizeEpoch(finalizedCheckpoint.getEpoch(), finalizedBlock, transaction);
    assertThat(transaction.commit()).isCompleted();
  } else {
    add(allBlocksAndStates);
    justifyAndFinalizeEpoch(finalizedCheckpoint.getEpoch(), finalizedBlock);
  }

  // Upon finalization, we should prune data
  final Set<Bytes32> blocksToPrune =
      Streams.concat(
              primaryChain.streamBlocksAndStates(0, pruneToSlot.longValue()),
              forkChain.streamBlocksAndStates(0, pruneToSlot.longValue()))
          .map(SignedBlockAndState::getRoot)
          .collect(Collectors.toSet());
  blocksToPrune.remove(finalizedBlock.getRoot());
  final Set<Checkpoint> checkpointsToPrune = Set.of(genesisCheckpoint);

  // Check data was pruned from store
  assertStoreWasPruned(store, blocksToPrune, checkpointsToPrune);

  restartStorage();

  // Check hot data
  final List<SignedBlockAndState> expectedHotBlocksAndStates =
      List.of(finalizedBlock, primaryChain.getBlockAndStateAtSlot(hotSlot));
  assertHotBlocksAndStates(store, expectedHotBlocksAndStates);
  final SignedBlockAndState prunedForkBlock = forkChain.getBlockAndStateAtSlot(hotSlot);
  assertThat(store.containsBlock(prunedForkBlock.getRoot())).isFalse();

  // Check finalized data
  final List<SignedBeaconBlock> expectedFinalizedBlocks =
      primaryChain
          .streamBlocksAndStates(0, 7)
          .map(SignedBlockAndState::getBlock)
          .collect(toList());
  assertBlocksFinalized(expectedFinalizedBlocks);
  assertGetLatestFinalizedRootAtSlotReturnsFinalizedBlocks(expectedFinalizedBlocks);
  assertBlocksAvailableByRoot(expectedFinalizedBlocks);
  assertFinalizedBlocksAvailableViaStream(
      1,
      3,
      primaryChain.getBlockAtSlot(1),
      primaryChain.getBlockAtSlot(2),
      primaryChain.getBlockAtSlot(3));

  switch (storageMode) {
    case ARCHIVE:
      // Finalized states should be available
      final Map<Bytes32, BeaconState> expectedStates =
          primaryChain
              .streamBlocksAndStates(0, 7)
              .collect(toMap(SignedBlockAndState::getRoot, SignedBlockAndState::getState));
      assertFinalizedStatesAvailable(expectedStates);
      break;
    case PRUNE:
      // Check pruned states
      final List<UnsignedLong> unavailableSlots =
          allBlocksAndStates.stream().map(SignedBlockAndState::getSlot).collect(toList());
      assertStatesUnavailable(unavailableSlots);
      break;
  }
}
 
Example 19
Source Project: Bytecoder   File: HijrahChronology.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public List<Era> eras() {
    return List.of(HijrahEra.values());
}
 
Example 20
@Override
public List<ConfigField> createFields() {
    // Default fields
    ConfigField mailSmtpHost = new TextInputConfigField(EmailPropertyKeys.JAVAMAIL_HOST_KEY.getPropertyKey(), LABEL_SMTP_HOST, JAVAMAIL_HOST_DESCRIPTION).applyRequired(true);
    ConfigField mailSmtpFrom = new TextInputConfigField(EmailPropertyKeys.JAVAMAIL_FROM_KEY.getPropertyKey(), LABEL_SMTP_FROM, JAVAMAIL_FROM_DESCRIPTION).applyRequired(true);
    ConfigField mailSmtpUser = new TextInputConfigField(EmailPropertyKeys.JAVAMAIL_USER_KEY.getPropertyKey(), LABEL_SMTP_USER, JAVAMAIL_USER_DESCRIPTION);
    ConfigField mailSmtpPassword = new PasswordConfigField(EmailPropertyKeys.JAVAMAIL_PASSWORD_KEY.getPropertyKey(), LABEL_SMTP_PASSWORD, JAVAMAIL_PASSWORD_DESCRIPTION, encryptionValidator);
    ConfigField mailSmtpAuth = new CheckboxConfigField(EmailPropertyKeys.JAVAMAIL_AUTH_KEY.getPropertyKey(), LABEL_SMTP_AUTH, JAVAMAIL_AUTH_DESCRIPTION)
                                   .applyRequiredRelatedField(mailSmtpUser.getKey())
                                   .applyRequiredRelatedField(mailSmtpPassword.getKey());

    // Advanced fields
    ConfigField mailSmtpPort = new NumberConfigField(EmailPropertyKeys.JAVAMAIL_PORT_KEY.getPropertyKey(), LABEL_SMTP_PORT, JAVAMAIL_PORT_DESCRIPTION).applyPanel(ADVANCED_PANEL);
    ConfigField mailSmtpConnectionTimeout = new NumberConfigField(EmailPropertyKeys.JAVAMAIL_CONNECTION_TIMEOUT_KEY.getPropertyKey(), LABEL_SMTP_CONNECTION_TIMEOUT, JAVAMAIL_CONNECTION_TIMEOUT_DESCRIPTION).applyPanel(ADVANCED_PANEL);
    ConfigField mailSmtpTimeout = new NumberConfigField(EmailPropertyKeys.JAVAMAIL_TIMEOUT_KEY.getPropertyKey(), LABEL_SMTP_TIMEOUT, JAVAMAIL_TIMEOUT_DESCRIPTION).applyPanel(ADVANCED_PANEL);
    ConfigField mailSmtpWriteTimeout = new NumberConfigField(EmailPropertyKeys.JAVAMAIL_WRITETIMEOUT_KEY.getPropertyKey(), LABEL_SMTP_WRITE_TIMEOUT, JAVAMAIL_WRITETIMEOUT_DESCRIPTION).applyPanel(ADVANCED_PANEL);
    ConfigField mailSmtpLocalhost = new TextInputConfigField(EmailPropertyKeys.JAVAMAIL_LOCALHOST_KEY.getPropertyKey(), LABEL_SMTP_LOCALHOST, JAVAMAIL_LOCALHOST_DESCRIPTION).applyPanel(ADVANCED_PANEL);
    ConfigField mailSmtpLocalAddress = new TextInputConfigField(EmailPropertyKeys.JAVAMAIL_LOCALHOST_ADDRESS_KEY.getPropertyKey(), LABEL_SMTP_LOCAL_ADDRESS, JAVAMAIL_LOCALHOST_ADDRESS_DESCRIPTION).applyPanel(ADVANCED_PANEL);
    ConfigField mailSmtpLocalPort = new NumberConfigField(EmailPropertyKeys.JAVAMAIL_LOCALHOST_PORT_KEY.getPropertyKey(), LABEL_SMTP_LOCAL_PORT, JAVAMAIL_LOCALHOST_PORT_DESCRIPTION).applyPanel(ADVANCED_PANEL);
    ConfigField mailSmtpEhlo = new CheckboxConfigField(EmailPropertyKeys.JAVAMAIL_EHLO_KEY.getPropertyKey(), LABEL_SMTP_EHLO, JAVAMAIL_EHLO_DESCRIPTION).applyPanel(ADVANCED_PANEL);
    ConfigField mailSmtpAuthMechanisms = new TextInputConfigField(EmailPropertyKeys.JAVAMAIL_AUTH_MECHANISMS_KEY.getPropertyKey(), LABEL_SMTP_AUTH_MECHANISMS, JAVAMAIL_AUTH_MECHANISMS_DESCRIPTION).applyPanel(ADVANCED_PANEL);
    ConfigField mailSmtpAuthLoginDisable = new CheckboxConfigField(EmailPropertyKeys.JAVAMAIL_AUTH_LOGIN_DISABLE_KEY.getPropertyKey(), LABEL_SMTP_AUTH_LOGIN_DISABLE, JAVAMAIL_AUTH_LOGIN_DISABLE_DESCRIPTION).applyPanel(ADVANCED_PANEL);
    ConfigField mailSmtpAuthPlainDisable = new CheckboxConfigField(EmailPropertyKeys.JAVAMAIL_AUTH_LOGIN_PLAIN_DISABLE_KEY.getPropertyKey(), LABEL_SMTP_AUTH_PLAIN_DISABLE, JAVAMAIL_AUTH_LOGIN_PLAIN_DISABLE_DESCRIPTION)
                                               .applyPanel(ADVANCED_PANEL);
    ConfigField mailSmtpAuthDigestMd5Disable = new CheckboxConfigField(EmailPropertyKeys.JAVAMAIL_AUTH_DIGEST_MD5_DISABLE_KEY.getPropertyKey(), LABEL_SMTP_AUTH_DIGEST_MD5_DISABLE, JAVAMAIL_AUTH_DIGEST_MD5_DISABLE_DESCRIPTION)
                                                   .applyPanel(ADVANCED_PANEL);
    ConfigField mailSmtpAuthNtlmDisable = new CheckboxConfigField(EmailPropertyKeys.JAVAMAIL_AUTH_NTLM_DISABLE_KEY.getPropertyKey(), LABEL_SMTP_AUTH_NTLM_DISABLE, JAVAMAIL_AUTH_NTLM_DISABLE_DESCRIPTION).applyPanel(ADVANCED_PANEL);
    ConfigField mailSmtpAuthNtlmDomain = new TextInputConfigField(EmailPropertyKeys.JAVAMAIL_AUTH_NTLM_DOMAIN_KEY.getPropertyKey(), LABEL_SMTP_AUTH_NTLM_DOMAIN, JAVAMAIL_AUTH_NTLM_DOMAIN_DESCRIPTION).applyPanel(ADVANCED_PANEL);
    ConfigField mailSmtpAuthNtlmFlags = new NumberConfigField(EmailPropertyKeys.JAVAMAIL_AUTH_NTLM_FLAGS_KEY.getPropertyKey(), LABEL_SMTP_AUTH_NTLM_FLAGS, JAVAMAIL_AUTH_NTLM_FLAGS_DESCRIPTION).applyPanel(ADVANCED_PANEL);
    ConfigField mailSmtpAuthXoauth2Disable = new CheckboxConfigField(EmailPropertyKeys.JAVAMAIL_AUTH_XOAUTH2_DISABLE_KEY.getPropertyKey(), LABEL_SMTP_AUTH_XOAUTH2_DISABLE, JAVAMAIL_AUTH_XOAUTH2_DISABLE_DESCRIPTION)
                                                 .applyPanel(ADVANCED_PANEL);
    ConfigField mailSmtpSubmitter = new TextInputConfigField(EmailPropertyKeys.JAVAMAIL_SUBMITTER_KEY.getPropertyKey(), LABEL_SMTP_SUBMITTER, JAVAMAIL_SUBMITTER_DESCRIPTION).applyPanel(ADVANCED_PANEL);
    ConfigField mailSmtpDnsNotify = new TextInputConfigField(EmailPropertyKeys.JAVAMAIL_DSN_NOTIFY_KEY.getPropertyKey(), LABEL_SMTP_DSN_NOTIFY, JAVAMAIL_DSN_NOTIFY_DESCRIPTION).applyPanel(ADVANCED_PANEL);
    ConfigField mailSmtpDnsRet = new TextInputConfigField(EmailPropertyKeys.JAVAMAIL_DSN_RET_KEY.getPropertyKey(), LABEL_SMTP_DSN_RET, JAVAMAIL_DSN_RET_DESCRIPTION).applyPanel(ADVANCED_PANEL);
    ConfigField mailSmtpAllow8bitmime = new CheckboxConfigField(EmailPropertyKeys.JAVAMAIL_ALLOW_8_BITMIME_KEY.getPropertyKey(), LABEL_SMTP_ALLOW_8_BIT_MIME, JAVAMAIL_ALLOW_8_BITMIME_DESCRIPTION).applyPanel(ADVANCED_PANEL);
    ConfigField mailSmtpSendPartial = new CheckboxConfigField(EmailPropertyKeys.JAVAMAIL_SEND_PARTIAL_KEY.getPropertyKey(), LABEL_SMTP_SEND_PARTIAL, JAVAMAIL_SEND_PARTIAL_DESCRIPTION).applyPanel(ADVANCED_PANEL);
    ConfigField mailSmtpSaslEnable = new CheckboxConfigField(EmailPropertyKeys.JAVAMAIL_SASL_ENABLE_KEY.getPropertyKey(), LABEL_SMTP_SASL_ENABLE, JAVAMAIL_SASL_ENABLE_DESCRIPTION).applyPanel(ADVANCED_PANEL);
    ConfigField mailSmtpSaslMechanisms = new TextInputConfigField(EmailPropertyKeys.JAVAMAIL_SASL_MECHANISMS_KEY.getPropertyKey(), LABEL_SMTP_SASL_MECHANISMS, JAVAMAIL_SASL_MECHANISMS_DESCRIPTION).applyPanel(ADVANCED_PANEL);
    ConfigField mailSmtpSaslAuthorizationId = new TextInputConfigField(EmailPropertyKeys.JAVAMAIL_SASL_AUTHORIZATION_ID_KEY.getPropertyKey(), LABEL_SMTP_SASL_AUTHORIZATION_ID, JAVAMAIL_SASL_AUTHORIZATION_ID_DESCRIPTION)
                                                  .applyPanel(ADVANCED_PANEL);
    ConfigField mailSmtpSaslRealm = new TextInputConfigField(EmailPropertyKeys.JAVAMAIL_SASL_REALM_KEY.getPropertyKey(), LABEL_SMTP_SASL_REALM, JAVAMAIL_SASL_REALM_DESCRIPTION).applyPanel(ADVANCED_PANEL);
    ConfigField mailSmtpSaslUseCanonicalHostname = new CheckboxConfigField(EmailPropertyKeys.JAVAMAIL_SASL_USE_CANONICAL_HOSTNAME_KEY.getPropertyKey(), LABEL_SMTP_SASL_USE_CANONICAL_HOSTNAME,
        JAVAMAIL_SASL_USE_CANONICAL_HOSTNAME_DESCRIPTION).applyPanel(ADVANCED_PANEL);
    ConfigField mailSmtpQuitwait = new CheckboxConfigField(EmailPropertyKeys.JAVAMAIL_QUITWAIT_KEY.getPropertyKey(), LABEL_SMTP_QUIT_WAIT, JAVAMAIL_QUITWAIT_DESCRIPTION).applyPanel(ADVANCED_PANEL);
    ConfigField mailSmtpReportSuccess = new CheckboxConfigField(EmailPropertyKeys.JAVAMAIL_REPORT_SUCCESS_KEY.getPropertyKey(), LABEL_SMTP_REPORT_SUCCESS, JAVAMAIL_REPORT_SUCCESS_DESCRIPTION).applyPanel(ADVANCED_PANEL);
    ConfigField mailSmtpSslEnable = new CheckboxConfigField(EmailPropertyKeys.JAVAMAIL_SSL_ENABLE_KEY.getPropertyKey(), LABEL_SMTP_SSL_ENABLE, JAVAMAIL_SSL_ENABLE_DESCRIPTION).applyPanel(ADVANCED_PANEL);
    ConfigField mailSmtpSslCheckServerIdentity = new CheckboxConfigField(EmailPropertyKeys.JAVAMAIL_SSL_CHECKSERVERIDENTITY_KEY.getPropertyKey(), LABEL_SMTP_SSL_CHECK_SERVER_IDENTITY, JAVAMAIL_SSL_CHECKSERVERIDENTITY_DESCRIPTION)
                                                     .applyPanel(ADVANCED_PANEL);
    ConfigField mailSmtpSslTrust = new TextInputConfigField(EmailPropertyKeys.JAVAMAIL_SSL_TRUST_KEY.getPropertyKey(), LABEL_SMTP_SSL_TRUST, JAVAMAIL_SSL_TRUST_DESCRIPTION).applyPanel(ADVANCED_PANEL);
    ConfigField mailSmtpSslProtocols = new TextInputConfigField(EmailPropertyKeys.JAVAMAIL_SSL_PROTOCOLS_KEY.getPropertyKey(), LABEL_SMTP_SSL_PROTOCOLS, JAVAMAIL_SSL_PROTOCOLS_DESCRIPTION).applyPanel(ADVANCED_PANEL);
    ConfigField mailSmtpSslCipherSuites = new TextInputConfigField
                                              (EmailPropertyKeys.JAVAMAIL_SSL_CIPHERSUITES_KEY.getPropertyKey(), LABEL_SMTP_SSL_CIPHER_SUITES, JAVAMAIL_SSL_CIPHERSUITES_DESCRIPTION).applyPanel(ADVANCED_PANEL);
    ConfigField mailSmtpStartTlsEnable = new CheckboxConfigField(EmailPropertyKeys.JAVAMAIL_STARTTLS_ENABLE_KEY.getPropertyKey(), LABEL_SMTP_START_TLS_ENABLED, JAVAMAIL_STARTTLS_ENABLE_DESCRIPTION).applyPanel(ADVANCED_PANEL);
    ConfigField mailSmtpStartTlsRequired = new CheckboxConfigField
                                               (EmailPropertyKeys.JAVAMAIL_STARTTLS_REQUIRED_KEY.getPropertyKey(), LABEL_SMTP_START_TLS_REQUIRED, JAVAMAIL_STARTTLS_REQUIRED_DESCRIPTION).applyPanel(ADVANCED_PANEL);
    ConfigField mailSmtpProxyHost = new TextInputConfigField(EmailPropertyKeys.JAVAMAIL_PROXY_HOST_KEY.getPropertyKey(), LABEL_SMTP_PROXY_HOST, JAVAMAIL_PROXY_HOST_DESCRIPTION).applyPanel(ADVANCED_PANEL);
    ConfigField mailSmtpProxyPort = new NumberConfigField(EmailPropertyKeys.JAVAMAIL_PROXY_PORT_KEY.getPropertyKey(), LABEL_SMTP_PROXY_PORT, JAVAMAIL_PROXY_PORT_DESCRIPTION).applyPanel(ADVANCED_PANEL);
    ConfigField mailSmtpSocksHost = new TextInputConfigField(EmailPropertyKeys.JAVAMAIL_SOCKS_HOST_KEY.getPropertyKey(), LABEL_SMTP_SOCKS_HOST, JAVAMAIL_SOCKS_HOST_DESCRIPTION).applyPanel(ADVANCED_PANEL);
    ConfigField mailSmtpSocksPort = new NumberConfigField(EmailPropertyKeys.JAVAMAIL_SOCKS_PORT_KEY.getPropertyKey(), LABEL_SMTP_SOCKS_PORT, JAVAMAIL_SOCKS_PORT_DESCRIPTION).applyPanel(ADVANCED_PANEL);
    ConfigField mailSmtpMailExtension = new TextInputConfigField(EmailPropertyKeys.JAVAMAIL_MAILEXTENSION_KEY.getPropertyKey(), LABEL_SMTP_MAIL_EXTENSION, JAVAMAIL_MAILEXTENSION_DESCRIPTION).applyPanel(ADVANCED_PANEL);
    ConfigField mailSmtpUserSet = new CheckboxConfigField(EmailPropertyKeys.JAVAMAIL_USERSET_KEY.getPropertyKey(), LABEL_SMTP_USE_RSET, JAVAMAIL_USERSET_DESCRIPTION).applyPanel(ADVANCED_PANEL);
    ConfigField mailSmtpNoopStrict = new CheckboxConfigField(EmailPropertyKeys.JAVAMAIL_NOOP_STRICT_KEY.getPropertyKey(), LABEL_SMTP_NOOP_STRICT, JAVAMAIL_NOOP_STRICT_DESCRIPTION).applyPanel(ADVANCED_PANEL);

    return List.of(mailSmtpHost, mailSmtpFrom, mailSmtpAuth, mailSmtpUser, mailSmtpPassword, mailSmtpPort, mailSmtpConnectionTimeout, mailSmtpTimeout, mailSmtpWriteTimeout, mailSmtpLocalhost, mailSmtpLocalAddress,
        mailSmtpLocalPort, mailSmtpEhlo, mailSmtpAuthMechanisms, mailSmtpAuthLoginDisable, mailSmtpAuthPlainDisable, mailSmtpAuthDigestMd5Disable, mailSmtpAuthNtlmDisable, mailSmtpAuthNtlmDomain, mailSmtpAuthNtlmFlags,
        mailSmtpAuthXoauth2Disable, mailSmtpSubmitter, mailSmtpDnsNotify, mailSmtpDnsRet, mailSmtpAllow8bitmime, mailSmtpSendPartial, mailSmtpSaslEnable, mailSmtpSaslMechanisms, mailSmtpSaslAuthorizationId, mailSmtpSaslRealm,
        mailSmtpSaslUseCanonicalHostname, mailSmtpQuitwait, mailSmtpReportSuccess, mailSmtpSslEnable, mailSmtpSslCheckServerIdentity, mailSmtpSslTrust, mailSmtpSslProtocols, mailSmtpSslCipherSuites, mailSmtpStartTlsEnable,
        mailSmtpStartTlsRequired, mailSmtpProxyHost, mailSmtpProxyPort, mailSmtpSocksHost, mailSmtpSocksPort, mailSmtpMailExtension, mailSmtpUserSet, mailSmtpNoopStrict
    );
}