@Test
public void testBuilder() {

  LogLevelMap levelMap =
      LogLevelMap.builder()
          .add(Level.FINE, String.class)
          .add(Level.WARNING, String.class.getPackage())
          .setDefault(Level.INFO)
          .build();
  assertThat(levelMap.getLevel("com.google")).isEqualTo(Level.INFO);
  assertThat(levelMap.getLevel("java.lang")).isEqualTo(Level.WARNING);
  assertThat(levelMap.getLevel("java.lang.String")).isEqualTo(Level.FINE);
}