LevelGuesser { public static String guessLevel(Codemap codemap) { String levelName = guessLevel(codemap, ""); log.info("guessed level {}", levelName); return levelName; } private  LevelGuesser(); static String guessLevel(Codemap codemap);  }
@Test public void guesses_most_interesting_level() { Codemap codemap = new CodemapBuilder() .member("com.alfa.C01") .member("com.beta.foo.C02") .member("com.beta.bla.C03") .member("com.beta.bla.x.C04") .member("com.beta.bla.x.C05") .member("com.beta.bla.x.C06") .member("com.beta.bla.x.C07") .member("com.beta.bla.x.C08") .member("com.beta.bla.y.C09") .member("com.beta.bla.y.C10") .member("com.beta.bla.y.C11") .member("com.beta.bla.y.C12") .member("com.beta.bla.y.C13") .getCodemap(); String mostInterestingLevel = guessLevel(codemap); assertThat(mostInterestingLevel).isEqualTo("com.beta.bla"); }