@Nullable
  public static EpoxyModel<?> getModelFromPayload(List<Object> payloads, long modelId) {
    if (payloads.isEmpty()) {
      return null;
    }

    for (Object payload : payloads) {
      DiffPayload diffPayload = (DiffPayload) payload;

      if (diffPayload.singleModel != null) {
        if (diffPayload.singleModel.id() == modelId) {
          return diffPayload.singleModel;
        }
      } else {
        EpoxyModel<?> modelForId = diffPayload.modelsById.get(modelId);
        if (modelForId != null) {
          return modelForId;
        }
      }
    }

    return null;
  }
@Test
  public void getSingleModelFromPayload() {
    TestModel model = new TestModel();
    List<Object> payloads = payloadsWithChangedModels(model);
    EpoxyModel<?> modelFromPayload = getModelFromPayload(payloads, model.id());

    assertEquals(model, modelFromPayload);
  }