### Question:
MnemonicUtils { public static byte[] generateEntropy(String mnemonic) { if (WORD_LIST == null) { WORD_LIST = populateWordList(); } if (isMnemonicEmpty(mnemonic)) { throw new IllegalArgumentException("Mnemonic is empty"); } String bits = mnemonicToBits(mnemonic); int totalLength = bits.length(); int ent = (int) Math.floor(totalLength / 33) * 32; String entropyBits = bits.substring(0, ent); String checksumBits = rightPad(bits.substring(ent), "0", 8); byte[] entropy = bitsToBytes(entropyBits); validateEntropy(entropy); byte newChecksum = calculateChecksum(entropy); if (newChecksum != (byte) Integer.parseInt(checksumBits, 2)) { throw new IllegalArgumentException("Checksum of mnemonic is invalid"); } return entropy; }  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 generateEntropyShouldGenerateExpectedEntropy() { byte[] actualEntropy = MnemonicUtils.generateEntropy(mnemonic); assertArrayEquals(initialEntropy, actualEntropy); }