Conversions { public static ScheduleStatus convertProtoState(TaskState taskState) { ScheduleStatus status = STATE_TRANSLATION.get(taskState); Preconditions.checkArgument(status != null, "Unrecognized task state " + taskState); return status; } private  Conversions(); static ScheduleStatus convertProtoState(TaskState taskState); static IHostAttributes getAttributes(Offer offer); static boolean isDedicated(Offer offer);  }
@Test public void testAllStatesHandled() { for (Protos.TaskState state : Protos.TaskState.values()) { assertNotNull(Conversions.convertProtoState(state)); } }