use of org.apache.ranger.db.XXTagDefDao in project ranger by apache.
the class TestRangerTagDefService method test7getTagDefByName.
@Test
public void test7getTagDefByName() {
XXTagDef xxTagDef = null;
XXTagDefDao xXTagDefDao = Mockito.mock(XXTagDefDao.class);
Mockito.when(daoMgr.getXXTagDef()).thenReturn(xXTagDefDao);
Mockito.when(xXTagDefDao.findByName(name)).thenReturn(xxTagDef);
RangerTagDef result = rangerTagDefService.getTagDefByName(name);
Assert.assertNull(result);
Mockito.verify(daoMgr).getXXTagDef();
Mockito.verify(xXTagDefDao).findByName(name);
}
Aggregations