@Test
  @ReadsSystemProperty
  @SetSystemProperty(key = GeodeGlossary.GEMFIRE_PREFIX + LOG_LEVEL, value = "finest")
  public void testPropertySources() throws Exception {
    // TODO: fix this test on Windows: the File renameTo and delete in finally fails on Windows
    String os = System.getProperty("os.name");
    if (os != null) {
      if (os.contains("Windows")) {
        return;
      }
    }
    File propFile = new File(GeodeGlossary.GEMFIRE_PREFIX + "properties");
    boolean propFileExisted = propFile.exists();
    File spropFile = new File("gfsecurity.properties");
    boolean spropFileExisted = spropFile.exists();
    try {
      Properties apiProps = new Properties();
      apiProps.setProperty(GROUPS, "foo, bar");
      {
        if (propFileExisted) {
          propFile.renameTo(new File(GeodeGlossary.GEMFIRE_PREFIX + "properties.sav"));
        }
        Properties fileProps = new Properties();
        fileProps.setProperty("name", "myName");
        FileWriter fw = new FileWriter(GeodeGlossary.GEMFIRE_PREFIX + "properties");
        fileProps.store(fw, null);
        fw.close();
      }
      {
        if (spropFileExisted) {
          spropFile.renameTo(new File("gfsecurity.properties.sav"));
        }
        Properties fileProps = new Properties();
        fileProps.setProperty(STATISTIC_SAMPLE_RATE, "999");
        FileWriter fw = new FileWriter("gfsecurity.properties");
        fileProps.store(fw, null);
        fw.close();
      }
      DistributionConfigImpl dci = new DistributionConfigImpl(apiProps);
      assertThat(dci.getAttributeSource(MCAST_PORT)).isNull();
      assertThat(ConfigSource.api()).isEqualTo(dci.getAttributeSource(GROUPS));
      assertThat(ConfigSource.sysprop()).isEqualTo(dci.getAttributeSource(LOG_LEVEL));
      assertThat(ConfigSource.Type.FILE).isEqualTo(dci.getAttributeSource("name").getType());
      assertThat(ConfigSource.Type.SECURE_FILE)
          .isEqualTo(dci.getAttributeSource(STATISTIC_SAMPLE_RATE).getType());
    } finally {
      propFile.delete();
      if (propFileExisted) {
        new File(GeodeGlossary.GEMFIRE_PREFIX + "properties.sav").renameTo(propFile);
      }
      spropFile.delete();
      if (spropFileExisted) {
        new File("gfsecurity.properties.sav").renameTo(spropFile);
      }
    }
  }
Tests that getting the log level is what we expect.
geode-core/src/integrationTest/java/org/apache/geode/distributed/internal/InternalDistributedSystemIntegrationTest.java