public ProfilingWriter(LanguageProfile profile) {
        this.profile = profile;
    }
@Test
    public void testProfilingWriter() throws IOException {
        ProfilingWriter writer = new ProfilingWriter();
        writer.write(" foo+BAR FooBar\n");
        writer.close();

        LanguageProfile profile = writer.getProfile();
        assertEquals(2, profile.getCount("_fo"));
        assertEquals(2, profile.getCount("foo"));
        assertEquals(1, profile.getCount("oo_"));
        assertEquals(1, profile.getCount("oob"));
        assertEquals(1, profile.getCount("oba"));
        assertEquals(1, profile.getCount("_ba"));
        assertEquals(2, profile.getCount("bar"));
        assertEquals(2, profile.getCount("ar_"));
    }