@Test public void translatesNotNullObjects() { InternalTask in = new InternalTask(); in.uuid = "1234"; in.description = "hello world"; in.urgency = 9.8401f; in.status = InternalTask.Status.Pending; assertTaskMatches(mTranslator.translate(in), "1234", "hello world", false, 9.8401f); in.status = InternalTask.Status.Recurring; assertFalse(mTranslator.translate(in).done); in.status = InternalTask.Status.Completed; assertTrue(mTranslator.translate(in).done); }
public Task translate(InternalTask in) { Task out = null; if (in != null) { out = new Task(); out.uuid = in.uuid; out.description = in.description; out.done = in.status == InternalTask.Status.Completed; out.urgency = in.urgency; } return out; }
Translator { public Task translate(InternalTask in) { Task out = null; if (in != null) { out = new Task(); out.uuid = in.uuid; out.description = in.description; out.done = in.status == InternalTask.Status.Completed; out.urgency = in.urgency; } return out; } }
Translator { public Task translate(InternalTask in) { Task out = null; if (in != null) { out = new Task(); out.uuid = in.uuid; out.description = in.description; out.done = in.status == InternalTask.Status.Completed; out.urgency = in.urgency; } return out; }  }
Translator { public Task translate(InternalTask in) { Task out = null; if (in != null) { out = new Task(); out.uuid = in.uuid; out.description = in.description; out.done = in.status == InternalTask.Status.Completed; out.urgency = in.urgency; } return out; }  Task translate(InternalTask in); }
Translator { public Task translate(InternalTask in) { Task out = null; if (in != null) { out = new Task(); out.uuid = in.uuid; out.description = in.description; out.done = in.status == InternalTask.Status.Completed; out.urgency = in.urgency; } return out; }  Task translate(InternalTask in);  }