toArray method on Dependencies/ConstraintsList and adjust tests to not care about the ordering