  @Test
  public void save() {

    CassandraInstance instance = createMock(CassandraInstance.class);
    Capture<PutAttributesRequest> requestCapture = new Capture<PutAttributesRequest>();
    expect(domainFactory.createFromRing(RING_NAME)).andReturn(domain(RING_NAME));
    expect(instance.getId()).andReturn(ID).times(2);
    expect(instance.getDataCenter()).andReturn(DATACENTER);
    expect(instance.getRack()).andReturn(RACK);
    expect(instance.getHostName()).andReturn(HOSTNAME);
    expect(instance.getPublicIpAddress()).andReturn(PUBLIC_IP_ADDRESS);
    expect(instance.getFullyQualifiedDomainName()).andReturn(FULLY_QUALIFIED_DOMAIN_NAME);
    simpleDbClient.putAttributes(capture(requestCapture));
    replayAll();

    dao.save(RING_NAME, instance);

    PutAttributesRequest request = requestCapture.getValue();
    assertEquals(DOMAIN, request.getDomainName());
    assertEquals(String.valueOf(ID), request.getItemName());
    assertReplaceableAttributes(request);
  }