### Question:
MnemonicUtils { public static byte[] generateSeed(String mnemonic, String passphrase) { if (isMnemonicEmpty(mnemonic)) { throw new IllegalArgumentException("Mnemonic is required to generate a seed"); } passphrase = passphrase == null ? "" : passphrase; String salt = String.format("mnemonic%s", passphrase); PKCS5S2ParametersGenerator gen = new PKCS5S2ParametersGenerator(new SHA512Digest()); gen.init(mnemonic.getBytes(UTF_8), salt.getBytes(UTF_8), SEED_ITERATIONS); return ((KeyParameter) gen.generateDerivedParameters(SEED_KEY_SIZE)).getKey(); }  static String generateMnemonic(byte[] initialEntropy); static byte[] generateEntropy(String mnemonic); static byte[] generateSeed(String mnemonic, String passphrase); static boolean validateMnemonic(String mnemonic);  }### Answer:
@Test public void generateSeedShouldGenerateExpectedSeeds() { byte[] actualSeed = MnemonicUtils.generateSeed(mnemonic, "TREZOR"); assertArrayEquals(seed, actualSeed); }