@Test
public void test2getServiceDefByName() throws Exception {

	RangerServiceDef rangerServiceDef = rangerServiceDef();
	String name = rangerServiceDef.getName();
	Mockito.when(serviceREST.getServiceDefByName(name)).thenReturn(rangerServiceDef);
	RangerServiceDef dbRangerServiceDef = publicAPIsv2.getServiceDefByName(name);
	Assert.assertNotNull(dbRangerServiceDef);
	Assert.assertEquals(dbRangerServiceDef, rangerServiceDef);
	Assert.assertEquals(dbRangerServiceDef.getId(),
			rangerServiceDef.getId());
	Assert.assertEquals(dbRangerServiceDef.getName(),
			rangerServiceDef.getName());
	Mockito.verify(serviceREST).getServiceDefByName(name);
}