### Question:
TertiaryKeyGenerator { public SecretKey generate() { return mKeyGenerator.generateKey(); } TertiaryKeyGenerator(SecureRandom secureRandom); SecretKey generate();  }### Answer:
@Test public void generate_generatesAESKeys() { SecretKey secretKey = mTertiaryKeyGenerator.generate(); assertThat(secretKey.getAlgorithm()).isEqualTo(KEY_ALGORITHM); }
@Test public void generate_generates256BitKeys() { SecretKey secretKey = mTertiaryKeyGenerator.generate(); assertThat(secretKey.getEncoded()).hasLength(KEY_SIZE_BITS / 8); }
@Test public void generate_generatesNewKeys() { SecretKey key1 = mTertiaryKeyGenerator.generate(); SecretKey key2 = mTertiaryKeyGenerator.generate(); assertThat(key1).isNotEqualTo(key2); }