@Test
public void getGoogleAdsErrors_duplicates_whenErrorsDiffer()
    throws InvalidProtocolBufferException {

  MockPath path0 =
      MockPath.newBuilder()
          .setIndex(Int64Value.newBuilder().setValue(0))
          .setFieldName(operationsFieldName)
          .build();
  MockPath path1 =
      MockPath.newBuilder()
          .setIndex(Int64Value.newBuilder().setValue(0))
          .setFieldName(operationsFieldName)
          .build();
  MockPath path2 = MockPath.newBuilder().setFieldName("somethingelse").build();
  MockError error0 = MockError.newBuilder().addLocation(path0).build();
  MockError error1 = MockError.newBuilder().addLocation(path1).addLocation(path2).build();
  // Swap the order of the errors.
  MockFailure failure = MockFailure.newBuilder().addErrors(error0).addErrors(error1).build();
  Status status = Status.newBuilder().addDetails(Any.pack(failure)).build();
  List<MockError> result = impl.getGoogleAdsErrors(0, status);
  assertEquals(2, result.size());
  assertEquals(error0, result.get(0));
  assertEquals(error1, result.get(1));
}