@Test(expected = RuntimeException.class)
public void checkTest() {

    FunctionFileName fileName = new FunctionFileName(executionNumber -> "file-" + executionNumber,
        s -> {
            throw new PowsyblException("error");
        }
    );
    fileName.getName(0);
}