@@ -0,0 +1,1819 @@
+package model;%0A%0Aimport org.assertj.core.util.Lists;%0Aimport org.junit.Test;%0A%0Aimport com.humio.mesos.dcos2humio.scheduler.model.ModelUtils;%0Aimport com.humio.mesos.dcos2humio.scheduler.model.mesos.ContainerId;%0Aimport com.humio.mesos.dcos2humio.scheduler.model.mesos.ContainerStatus;%0Aimport com.humio.mesos.dcos2humio.scheduler.model.mesos.Status;%0Aimport com.humio.mesos.dcos2humio.scheduler.model.mesos.Task;%0Aimport com.humio.mesos.dcos2humio.shared.model.TaskDetails;%0A%0Aimport static org.assertj.core.api.Assertions.assertThat;%0A%0Apublic class ModelUtilsTest %7B%0A%0A    @Test%0A    public void taskWithContainerId() %7B%0A        ContainerStatus containerStatus = new ContainerStatus();%0A        ContainerId containerId = new ContainerId();%0A        containerId.setValue(%22edae7b18-a73d-4ee8-833f-336fc8ad5633%22);%0A        containerStatus.setContainerId(containerId);%0A        Task task = setTask();%0A        Status status = new Status();%0A        status.setState(%22TASK_RUNNING%22);%0A        status.setContainerStatus(containerStatus);%0A        task.setStatuses(Lists.newArrayList(status));%0A        TaskDetails taskDetails = ModelUtils.from(task).build();%0A%0A        assertThat(taskDetails.getContainerId()).isEqualTo(containerId.getValue());%0A    %7D%0A%0A    @Test%0A    public void taskWithNullContainerId() %7B%0A        Task task = setTask();%0A        Status status = new Status();%0A        status.setState(%22TASK_KILLED%22);%0A        task.setStatuses(Lists.newArrayList(status));%0A        TaskDetails taskDetails = ModelUtils.from(task).build();%0A%0A        assertThat(taskDetails.getContainerId()).isNull();%0A    %7D%0A%0A    private Task setTask() %7B%0A        Task task = new Task();%0A        task.setId(%22active-framework-1.recent-finished-task%22);%0A        task.setSlaveId(%22private-agent-1%22);%0A        task.setFrameworkId(%22active-framework-1%22);%0A        return task;%0A    %7D%0A%0A%7D%0A

Add modelutils test