### Question:
SecurityService { public static void main(String[] args) throws IllegalArgumentException { if (args == null || args.length < 2) { throw new IllegalArgumentException("You have to pass username (provider name) as first parameter and password as second one to obtain hash"); } Logger log = Logger.getLogger(SecurityService.class.getName()); SecurityService s = new SecurityService(); log.info("Hash for username (provider name) '" + args[0] + "' is: " + s.createPwdHash(args[0], args[1])); }  static void main(String[] args); String createPwdHash(String username, String pwd); boolean checkPwdHash(String username, String pwd, String hash);  }### Answer:
@Test(expected = IllegalArgumentException.class) public void main_noArguments() { SecurityService.main(null); }
@Test(expected = IllegalArgumentException.class) public void main_badArguments() { SecurityService.main(new String[] { "aa" }); }
@Test public void main() { SecurityService.main(new String[] { "provider1", "pwd" }); SecurityService.main(new String[] { "provider2", "pwd" }); }