public static GlobalConfig readConfig() throws IOException, InvalidGlobalConfigException {
    return readConfig(getConfigDir());
  }
@Test
  public void testReadConfig_missingRegistry() throws IOException {
    String json = "{\"registryMirrors\":[{\"mirrors\":[\"mirror.gcr.io\"]}]}";
    Files.write(configDir.resolve("config.json"), json.getBytes(StandardCharsets.UTF_8));
    InvalidGlobalConfigException exception =
        assertThrows(InvalidGlobalConfigException.class, () -> GlobalConfig.readConfig(configDir));
    assertThat(exception)
        .hasMessageThat()
        .startsWith(
            "'registryMirrors.registry' property is missing; see "
                + "https://github.com/GoogleContainerTools/jib/blob/master/docs/faq.md#where-is-the-global-jib-configuration-file-and-how-i-can-configure-it "
                + "to fix or you may need to delete ");
  }