### Question:
HashUtils { public static String generateMd5Hash(final Object... args) { return generateHash(generateParameterKey(args), HashType.MD5); }  static String generateMd5Hash(final Object... args); static String generateShaHash(final Object... args);  }### Answer:
@Test public void shouldGenerateMd5Hash_noArgs() { final String hash = HashUtils.generateMd5Hash(); assertNotNull(hash); assertEquals(NULL_ARG_SECRET_MD5, hash); }
@Test public void shouldGenerateMd5Hash_singleStringArg() { final String arg1 = "test"; final String hash = HashUtils.generateMd5Hash(arg1); assertNotNull(hash); assertEquals(STRING_ARG_SECRET_MD5, hash); }
@Test public void shouldGenerateMd5Hash_singleListArg() { final List<String> arg1 = new ArrayList<String>(Arrays.asList("test1", "test2", "test3")); final String hash = HashUtils.generateMd5Hash(arg1); assertNotNull(hash); assertEquals(LIST_ARG_SECRET_MD5, hash); }
@Test public void shouldGenerateMd5Hash_mixedArg() { final String arg1 = "test"; final List<String> arg2 = new ArrayList<String>(Arrays.asList("test1", "test2", "test3")); final String hash = HashUtils.generateMd5Hash(arg1, arg2); assertNotNull(hash); assertEquals(MIXED_ARG_SECRET_MD5, hash); }