protected List<StepInstance> createStepInstances(Step step,Long bottomProteinId,Long topProteinId){
  final List<StepInstance> stepInstances=new ArrayList<StepInstance>();
  final long sliceSize=(step.getMaxProteins() == null) ? topProteinId - bottomProteinId + 1 : step.getMaxProteins();
  for (long bottom=bottomProteinId; bottom <= topProteinId; bottom+=sliceSize) {
    final long top=Math.min(topProteinId,bottom + sliceSize - 1);
    stepInstances.add(new StepInstance(step,bottom,top,null,null));
  }
  return stepInstances;
}

protected List < StepInstance > createStepInstances ( Step step , Long bottomProteinId , Long topProteinId ) { final List < StepInstance > stepInstances = new ArrayList < StepInstance > ( ) ; final long sliceSize = ( step . getMaxProteins ( ) == null ) ? topProteinId - bottomProteinId + 1 : step . getMaxProteins ( ) ; for ( long bottom = bottomProteinId ; bottom <= topProteinId ; bottom += sliceSize ) { final long top = Math . min ( topProteinId , bottom + sliceSize - 1 ) ; stepInstances . add ( new StepInstance ( step , bottom , top , null , null ) ) ; } return stepInstances ; }
should be private - but want to junit test as prone to boundary errors !
