### Question:
Main { static String guessInputFormat(String[] inputFileNames) { String inputFormat = ""; for (String inputFileName : inputFileNames) { String format = detectFormat(inputFileName); if (!inputFormat.equals("") && !format.equals(inputFormat)) { LOG.warn("There are more than one file type...: {} and {}", format, inputFormat); LOG.warn("Guess file format as plain..."); return "plain"; } inputFormat = format; } return inputFormat.equals("") ? "plain" : inputFormat; } private  Main(); static void main(String... args); @SuppressWarnings("static-access") static int run(String... args);  }### Answer:
@Test void testGuessFormat() throws Exception { String[] inputs = new String[]{ "sample/conf/sampledoc1.adoc", "sample/conf/sampledoc2.adoc", }; assertEquals("asciidoc", Main.guessInputFormat(inputs)); }
@Test void testGuessTwoFormats() throws Exception { String[] inputs = new String[]{ "sample/conf/sampledoc1.md", "sample/conf/sampledoc2.adoc", }; assertEquals("plain", Main.guessInputFormat(inputs)); }
@Test void testGuessFromAbbrebiatedFoamts() throws Exception { String[] inputs = new String[]{ "sample/conf/sampledoc1.md", "sample/conf/sampledoc2.markdown", }; assertEquals("markdown", Main.guessInputFormat(inputs)); }
@Test void testGuessFromNoExtensions() throws Exception { String[] inputs = new String[]{ "sample/conf/sampledoc", "sample/conf/sampledoc", }; assertEquals("plain", Main.guessInputFormat(inputs)); }