FastOdsException extends Exception { public static FastOdsException wrongTableName(final String name) { return new FastOdsException("Wrong table name [" + name + "]"); } FastOdsException(final String message);  FastOdsException(final Exception e); static FastOdsException wrongTableNumber(final int n); static FastOdsException wrongTableName(final String name);  }
@Test public final void testWrongTableName() { final Exception e = FastOdsException.wrongTableName("tab"); Assert.assertEquals("Wrong table name [tab]", e.getMessage()); }