DbParameterAccessors implements Iterable<DbParameterAccessor> { public List<String> getSortedAccessorNames() { SortedSet<DbParameterAccessor> nameSet = new TreeSet<>(new PositionComparator()); nameSet.addAll(new ArrayList<>(accessors)); List<String> nameList = new ArrayList<>(); for (DbParameterAccessor p : nameSet) { nameList.add(p.getName()); } return nameList; } DbParameterAccessors(DbParameterAccessor[] accessors);  DbParameterAccessors(); void bindParameters(StatementExecution statement); DbParameterAccessor[] toArray(); @Override Iterator<DbParameterAccessor> iterator(); void add(DbParameterAccessor accessor); Map<DbParameterAccessor, T> zipWith(List<T> items); List<DbParameterAccessor> getOutputAccessors(); List<DbParameterAccessor> getInputAccessors(); List<String> getSortedAccessorNames(); int getNumberOfParameters(); boolean containsReturnValue();  }
@Test public void canGetDistinctNamesSortedByPosition() { assertEquals( asList("dummy1", "dummy2", "dummy3"), accessors.getSortedAccessorNames()); }