@Test
public void testUpdateXResource() {

	VXResource vxResource = vxResource(Id);
	RangerPolicy rangerPolicy = rangerPolicy(Id);
	RangerService rangerService = rangerService(Id);
	Mockito.when(serviceREST.getService(vxResource.getAssetId())).thenReturn(rangerService);
	Mockito.when(serviceREST.updatePolicy(rangerPolicy)).thenReturn(rangerPolicy);
	Mockito.when(serviceUtil.toRangerPolicy(vxResource, rangerService)).thenReturn(rangerPolicy);
	Mockito.when(serviceUtil.toVXResource(rangerPolicy, rangerService)).thenReturn(vxResource);
	VXResource actualvxResource = assetREST.updateXResource(vxResource);
	Assert.assertNotNull(actualvxResource);
	Assert.assertEquals(vxResource, actualvxResource);
	Mockito.verify(serviceREST).getService(vxResource.getAssetId());
	Mockito.verify(serviceREST).updatePolicy(rangerPolicy);
	Mockito.verify(serviceUtil).toRangerPolicy(vxResource, rangerService);
	Mockito.verify(serviceUtil).toVXResource(rangerPolicy, rangerService);
}