@Test
public void test2updateServiceDef() throws Exception {

	RangerServiceDef rangerServiceDef = rangerServiceDef();
	Mockito.when(validatorFactory.getServiceDefValidator(svcStore))
			.thenReturn(serviceDefValidator);
	Mockito.when(
			svcStore.updateServiceDef((RangerServiceDef) Mockito
					.any())).thenReturn(rangerServiceDef);
	RangerServiceDef dbRangerServiceDef = serviceREST
			.updateServiceDef(rangerServiceDef);
	Assert.assertNotNull(dbRangerServiceDef);
	Assert.assertEquals(dbRangerServiceDef, rangerServiceDef);
	Assert.assertEquals(dbRangerServiceDef.getId(),
			rangerServiceDef.getId());
	Assert.assertEquals(dbRangerServiceDef.getName(),
			rangerServiceDef.getName());
	Assert.assertEquals(dbRangerServiceDef.getImplClass(),
			rangerServiceDef.getImplClass());
	Assert.assertEquals(dbRangerServiceDef.getLabel(),
			rangerServiceDef.getLabel());
	Assert.assertEquals(dbRangerServiceDef.getDescription(),
			rangerServiceDef.getDescription());
	Assert.assertEquals(dbRangerServiceDef.getRbKeyDescription(),
			rangerServiceDef.getRbKeyDescription());
	Assert.assertEquals(dbRangerServiceDef.getUpdatedBy(),
			rangerServiceDef.getUpdatedBy());
	Assert.assertEquals(dbRangerServiceDef.getUpdateTime(),
			rangerServiceDef.getUpdateTime());
	Assert.assertEquals(dbRangerServiceDef.getVersion(),
			rangerServiceDef.getVersion());
	Assert.assertEquals(dbRangerServiceDef.getConfigs(),
			rangerServiceDef.getConfigs());
	Mockito.verify(validatorFactory).getServiceDefValidator(svcStore);
	Mockito.verify(svcStore).updateServiceDef(rangerServiceDef);
}