@Test public void maxWaitTimeoutsMustBeGreaterThanZero() { // given this.expectedException.expect(IllegalArgumentException.class); this.expectedException.expectMessage("maxWaitTimeouts must be greater than zero"); // when TaskletStep step = new RemoteChunkingMasterStepBuilder<String, String>("step") .maxWaitTimeouts(-1) .build(); // then // expected exception }