@Test
  public void testConflictedUpdate() throws Exception {
    setUriInfo(setUpBasicUriExpectations());
    setUpGetEntityExpectations(1);
    control.replay();

    OpenStackImageProvider model = getModel(1);
    model.setId(GUIDS[1].toString());
    try {
      resource.update(model);
      fail("expected WebApplicationException");
    } catch (WebApplicationException wae) {
      verifyImmutabilityConstraint(wae);
    }
  }
 private OpenStackImageProvider getModel(int index) {
   OpenStackImageProvider model = new OpenStackImageProvider();
   model.setName(NAMES[index]);
   model.setDescription(DESCRIPTIONS[index]);
   return model;
 }