GoogleAPICredentialRequestor { public static void main(final String[] args) throws IOException, ParseException { int size = (args == null) ? 0 : args.length; if (size != 3) { throw new IllegalArgumentException('\n' + "[ERROR] Wrong number of arguments: " + size + '\n'); } else { registerOAuth2Credential(new File(args[0]), args[1], args[2]); } } private  GoogleAPICredentialRequestor(); static void main(final String[] args);  }
@Test(expected = IllegalArgumentException.class) public void testInvalidArgs() throws IOException, ParseException { GoogleAPICredentialRequestor.main(new String[0]); }
@Test(expected = IllegalArgumentException.class) public void testFileDoesNotExist() throws IOException, ParseException { GoogleAPICredentialRequestor.main(new String[] {"/this/path/does/exist", "credentialDataStore", "dataStoreDirectory"}); }