protected void assertContainsOnly(String errorMessage, Iterator<FSEntry> it, String[] requiredNames)
protected void assertContainsOnly(String errorMessage, Iterator<? extends FSEntry> it, String[] requiredNames)
    protected void assertContainsOnly(String errorMessage, Iterator<FSEntry> it, String[] requiredNames)    {        boolean ok = true;        List<String> reqNames = (requiredNames == null) ? new ArrayList<String>() : new ArrayList<String>(Arrays.asList(requiredNames));        List<String> names = TestUtils.getEntryNames(it);        //log.debug("reqNames="+reqNames);        //log.debug("names="+names);        // remove required names from list        for(int i = 0 ; i < reqNames.size(); i++)        {            if(!names.remove(reqNames.get(i)))            {                ok = false;                break;            }        }        if(ok)        {            // remaining names must be null            for(int i = 0 ; i < names.size(); i++)            {                if(names.get(i) != null)                {                    ok = false;                    break;                }            }        }        assertTrue(errorMessage+" (must contains only "+TestUtils.toString(reqNames)+") found: "+                TestUtils.toString(names), ok);    }