@Test
 public void testSaveAllTags() throws Exception {
   final RemoteConfig rc = new RemoteConfig(config, "origin");
   rc.addURI(new URIish("/some/dir"));
   rc.addFetchRefSpec(new RefSpec("+refs/heads/*:refs/remotes/" + rc.getName() + "/*"));
   rc.setTagOpt(TagOpt.FETCH_TAGS);
   rc.update(config);
   checkConfig(
       "[remote \"origin\"]\n"
           + "\turl = /some/dir\n"
           + "\tfetch = +refs/heads/*:refs/remotes/origin/*\n"
           + "\ttagopt = --tags\n");
 }