@Test(expected = IllegalArgumentException.class)
public void testGenerate_nullValue() throws Exception {

    TokenStringGenerator generator = new TokenStringGenerator();
    try {
        generator.generate(null);
    } catch (Exception e) {
        assertThat(e.getMessage(), is("seed must not be null"));
        throw e;
    }
}