@Test void eth1PrivateKeyReturnsCredential() { final Eth1PrivateKeyOptions eth1PrivateKeyOptions = new Eth1PrivateKeyOptions(); eth1PrivateKeyOptions.eth1PrivateKey = ETH1_PRIVATE_KEY; final RegisterParams registerParams = new RegisterParams(commandSpec, eth1PrivateKeyOptions, SHUTDOWN_FUNCTION, consoleAdapter); final Credentials eth1Credentials = registerParams.getEth1Credentials(); assertThat(eth1Credentials.getEcKeyPair()).isEqualTo(EXPECTED_EC_KEYPAIR); }
Credentials getEth1Credentials() { if (eth1PrivateKeyOptions.eth1PrivateKey != null) { return Credentials.create(eth1PrivateKeyOptions.eth1PrivateKey); } else if (eth1PrivateKeyOptions.keystoreOptions != null) { return getEth1CredentialsFromKeystore(); } else { throw new IllegalStateException("Eth1 Private Key Options are not initialized"); } }
RegisterParams { Credentials getEth1Credentials() { if (eth1PrivateKeyOptions.eth1PrivateKey != null) { return Credentials.create(eth1PrivateKeyOptions.eth1PrivateKey); } else if (eth1PrivateKeyOptions.keystoreOptions != null) { return getEth1CredentialsFromKeystore(); } else { throw new IllegalStateException("Eth1 Private Key Options are not initialized"); } } }
RegisterParams { Credentials getEth1Credentials() { if (eth1PrivateKeyOptions.eth1PrivateKey != null) { return Credentials.create(eth1PrivateKeyOptions.eth1PrivateKey); } else if (eth1PrivateKeyOptions.keystoreOptions != null) { return getEth1CredentialsFromKeystore(); } else { throw new IllegalStateException("Eth1 Private Key Options are not initialized"); } } RegisterParams(); @VisibleForTesting  RegisterParams(
      final CommandSpec commandSpec,
      final Eth1PrivateKeyOptions eth1PrivateKeyOptions,
      final IntConsumer shutdownFunction,
      final ConsoleAdapter consoleAdapter); }
RegisterParams { Credentials getEth1Credentials() { if (eth1PrivateKeyOptions.eth1PrivateKey != null) { return Credentials.create(eth1PrivateKeyOptions.eth1PrivateKey); } else if (eth1PrivateKeyOptions.keystoreOptions != null) { return getEth1CredentialsFromKeystore(); } else { throw new IllegalStateException("Eth1 Private Key Options are not initialized"); } } RegisterParams(); @VisibleForTesting  RegisterParams(
      final CommandSpec commandSpec,
      final Eth1PrivateKeyOptions eth1PrivateKeyOptions,
      final IntConsumer shutdownFunction,
      final ConsoleAdapter consoleAdapter); RegisterAction createRegisterAction(final boolean verboseOutputEnabled); }
RegisterParams { Credentials getEth1Credentials() { if (eth1PrivateKeyOptions.eth1PrivateKey != null) { return Credentials.create(eth1PrivateKeyOptions.eth1PrivateKey); } else if (eth1PrivateKeyOptions.keystoreOptions != null) { return getEth1CredentialsFromKeystore(); } else { throw new IllegalStateException("Eth1 Private Key Options are not initialized"); } } RegisterParams(); @VisibleForTesting  RegisterParams(
      final CommandSpec commandSpec,
      final Eth1PrivateKeyOptions eth1PrivateKeyOptions,
      final IntConsumer shutdownFunction,
      final ConsoleAdapter consoleAdapter); RegisterAction createRegisterAction(final boolean verboseOutputEnabled);  }