TaskFromRequestRegistry implements TaskFromRequest { public static Builder builder() { return new Builder(); } private  TaskFromRequestRegistry(String taskParameterName, Map<TaskRegistrationKey, TaskFromRequest> taskGenerators); static Builder builder(); static TaskFromRequestRegistry of(TaskRegistrationKey key, TaskFromRequest generator); @Override Task fromRequest(Request request);  }
@Test void buildShouldThrowWhenNoTasks() { assertThatThrownBy(() -> TaskFromRequestRegistry.builder().build()) .isInstanceOf(IllegalStateException.class); }