Here you can find the source of expectedOrder(List> src, Object first, Object second)
private static void expectedOrder(List<?> src, Object first, Object second)
//package com.java2s; //License from project: Apache License import java.util.List; public class Main { private static void expectedOrder(List<?> src, Object first, Object second) { int firstIndex = src.indexOf(first); int secondIndex = src.indexOf(second); if (firstIndex >= secondIndex) { throw new AssertionError("Wrong order for [" + first + ", " + second + "] in " + src); }/*from www. ja v a 2s . c om*/ } }