static void checkFormat(final String originalFilename) {
    final List<String> fileNameSplit = Splitter.on(".").splitToList(originalFilename);
    if (fileNameSplit.size() <= 1) {
      throw new BadRequestException("The file format is invalid.");
    }

    for (String s : fileNameSplit) {
      if (StringUtils.isEmpty(s)) {
        throw new BadRequestException("The file format is invalid.");
      }
    }
  }
@Test
  public void checkFormat() {
    ConfigFileUtils.checkFormat("1234+default+app.properties");
    ConfigFileUtils.checkFormat("1234+default+app.yml");
    ConfigFileUtils.checkFormat("1234+default+app.json");
  }