}
@Test
public void shouldUpdateOperation() throws SDKException {
//Given
OperationRepresentation op = new OperationRepresentation();
op.setStatus(OperationStatus.EXECUTING.toString());
op.setId(new GId("myId"));
op.setCreationTime(new Date());
OperationRepresentation updated = new OperationRepresentation();
when(restConnector.put(eq(DEVICE_CONTROL_COLLECTION_URL + "/myId"), eq(DeviceControlMediaType.OPERATION),
argThat(hasOnlyUpdateFields(op)))).thenReturn(updated);
//when
OperationRepresentation result = deviceControlApi.update(op);
// then
assertThat(result, sameInstance(updated));
}