@Test public void stepLocatorMustNotBeNull() { // given this.expectedException.expect(IllegalArgumentException.class); this.expectedException.expectMessage("stepLocator must not be null"); // when new RemotePartitioningWorkerStepBuilder("step").stepLocator(null); // then // expected exception }