@Test
public void testGetClassNameSection() {

    assertThat(XLogUtils.getClassNameSection("", 0), is(""));
    assertThat(XLogUtils.getClassNameSection(null, 0), nullValue());
    assertThat(XLogUtils.getClassNameSection("com", -1), is("com"));
    assertThat(XLogUtils.getClassNameSection("com", 2), is("com"));
    assertThat(XLogUtils.getClassNameSection("com.promegu", 1), is("com"));
    assertThat(XLogUtils.getClassNameSection("com.promegu", 2), is("com.promegu"));
    assertThat(XLogUtils.getClassNameSection("com.promegu.xlog.base", 2), is("com.promegu"));
    //CHECKSTYLE:OFF
    assertThat(XLogUtils.getClassNameSection("com.promegu.xlog.base", 4),
            is("com.promegu.xlog.base"));
    //CHECKSTYLE:ON
}