private boolean containsTwoPorts(List<Protos.Resource> resources) { return Resources.selectTwoPortsFromRange(resources).size() == 2; }