@Test
public void testToIdString() {

    assertEquals("foo-bar", StringUtils.toIdString("foo_bar"));
    thrown.expect(NullPointerException.class);
    StringUtils.toIdString(null);
    // Method is not expected to return due to exception thrown
}