public boolean check() {
    // the dependency com.sonarsource:sonarsource-branding is shaded to webapp
    // during official build (see sonar-web pom)
    File brandingFile = new File(serverFileSystem.getHomeDir(), BRANDING_FILE_PATH);
    // no need to check that the file exists. java.io.File#length() returns zero in this case.
    return brandingFile.length() > 0L;
  }
@Test
  public void official_distribution() throws Exception {
    File rootDir = temp.newFolder();
    FileUtils.write(new File(rootDir, OfficialDistribution.BRANDING_FILE_PATH), "1.2");
    when(serverFileSystem.getHomeDir()).thenReturn(rootDir);

    assertThat(underTest.check()).isTrue();
  }