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