//when
HashSet<StepExecution> stepExecutions = new HashSet<StepExecution>();
stepExecutions.add(new StepExecution("step1", new JobExecution(5l)));
when(stepExecutionSplitter.split((StepExecution) anyObject(), eq(1))).thenReturn(stepExecutions);
when(message.getPayload()).thenReturn(Collections.emptyList());
when(operations.receive((PollableChannel) anyObject())).thenReturn(message);
//set
messageChannelPartitionHandler.setMessagingOperations(operations);
//execute
Collection<StepExecution> executions = messageChannelPartitionHandler.handle(stepExecutionSplitter, masterStepExecution);