### Question:
HMACAlgorithm extends Algorithm { static byte[] getSecretBytes(String secret) throws IllegalArgumentException { if (secret == null) { throw new IllegalArgumentException("The Secret cannot be null"); } return secret.getBytes(StandardCharsets.UTF_8); } HMACAlgorithm(CryptoHelper crypto, String id, String algorithm, byte[] secretBytes);   HMACAlgorithm(String id, String algorithm, byte[] secretBytes);   HMACAlgorithm(String id, String algorithm, String secret); @Override void verify(DecodedJWT jwt); @Override byte[] sign(byte[] headerBytes, byte[] payloadBytes); @Override @Deprecated byte[] sign(byte[] contentBytes);  }### Answer:
@Test public void shouldGetStringBytes() throws Exception { String text = "abcdef123456!@#$%^"; byte[] expectedBytes = text.getBytes("UTF-8"); assertTrue(Arrays.equals(expectedBytes, HMACAlgorithm.getSecretBytes(text))); }