ImmutableSet.copyOf(task.getResourcesList()));
}
@Test
public void testCreateFromPortsUnset() {
AssignedTask assignedTask = TASK.newBuilder();
assignedTask.unsetAssignedPorts();
TaskInfo task = taskFactory.createFrom(IAssignedTask.build(assignedTask), SLAVE);
assertEquals(DEFAULT_EXECUTOR, task.getExecutor());
assertEquals(ImmutableSet.of(
Resources.makeMesosResource(Resources.CPUS, TASK.getTask().getNumCpus()),
Resources.makeMesosResource(Resources.RAM_MB, TASK.getTask().getRamMb()),