{
final Date nominationDate = DateUtils.setMilliseconds(DateUtils.addDays(new Date(), -7), 0);
final Date voteDate = new Date();
final Nomination nomination = new Nomination(UUID.randomUUID().toString(), "Test Agent", "Department of Testing", "https://sandbox.demo.socrata.com", nominationDate, null, false, false);
final Nomination nominationUpdate = new Nomination(nomination.getName(), "Test Agent", "Department of Testing", "https://sandbox.demo.socrata.com", nominationDate, voteDate, true, false);
final Soda2Producer producer= createProducer();
final Meta objectMetadata = producer.addObject(UPDATE_DATA_SET, nomination);
final Nomination createdNomination = producer.getById(UPDATE_DATA_SET, objectMetadata.getId(), Nomination.class);
TestCase.assertTrue(EqualsBuilder.reflectionEquals(nomination, createdNomination));
final Meta updateMeta= producer.update(UPDATE_DATA_SET, objectMetadata.getId(), nominationUpdate);
TestCase.assertEquals(objectMetadata.getId(), updateMeta.getId());
TestCase.assertEquals(objectMetadata.getCreatedAt(), updateMeta.getCreatedAt());
TestCase.assertEquals(objectMetadata.getCreatedMeta(), updateMeta.getCreatedMeta());
TestCase.assertFalse(objectMetadata.getCreatedAt().after(updateMeta.getUpdatedAt()));
final Nomination updatedNomination = producer.getById(UPDATE_DATA_SET, objectMetadata.getId(), Nomination.class);
//UNDONE(willpugh) -- Turn back on when bug 7102 is fixed.
//TestCase.assertTrue(EqualsBuilder.reflectionEquals(nominationUpdate, updatedNomination));
List l = Lists.newArrayList(new DeleteRecord(objectMetadata.getId(), true));
ObjectMapper m = new ObjectMapper();
System.out.println(m.writeValueAsString(l));
UpsertResult result = producer.upsert(UPDATE_DATA_SET, l);
try {
final Nomination deletedNomination = producer.getById(UPDATE_DATA_SET, objectMetadata.getId(), Nomination.class);
TestCase.fail();
} catch (DoesNotExistException e) {
//Expected Condition
}