Resources.makeMesosResource(Resources.DISK_MB, TASK.getDiskMb())),
ImmutableSet.copyOf(resources.toResourceList(ImmutableSet.<Integer>of())));
}
private void expectRanges(Set<Pair<Long, Long>> expected, Set<Integer> values) {
Resource resource = Resources.makeMesosRangeResource(NAME, values);
assertEquals(Type.RANGES, resource.getType());
assertEquals(NAME, resource.getName());
Set<Pair<Long, Long>> actual = ImmutableSet.copyOf(Iterables.transform(
resource.getRanges().getRangeList(),
new Function<Range, Pair<Long, Long>>() {
@Override
public Pair<Long, Long> apply(Range range) {
return Pair.of(range.getBegin(), range.getEnd());
}