@Test
public void testToVXAsset(){

        RangerService rangerService = new RangerService();
        VXAsset expectedVXAssesst = new VXAsset();
        expectedVXAssesst.setId(1L);
        expectedVXAssesst.setName("hive");
        expectedVXAssesst.setDescription("hive Description");
        expectedVXAssesst.setActiveStatus(1);
        Map<String, String> map = new HashMap<String, String>();
        map.put("config", "hiveConfig");
        rangerService.setId(1L);
        rangerService.setCreateTime(new Date());
        rangerService.setUpdateTime(new Date());
        rangerService.setCreatedBy("ranger");
        rangerService.setUpdatedBy("rangerAdmin");
        rangerService.setType("hive");
        rangerService.setName("hive");
        rangerService.setDescription("hive Description");
        rangerService.setIsEnabled(true);
        rangerService.setConfigs(map);
        Mockito.when(jsonUtil.readMapToString(map)).thenReturn("{config : hiveConfig}");
        VXAsset actualVXAsset = serviceUtil.toVXAsset(rangerService);
        Assert.assertNotNull(actualVXAsset);
        Assert.assertEquals(actualVXAsset.getId(), expectedVXAssesst.getId());
        Assert.assertEquals(actualVXAsset.getName(), expectedVXAssesst.getName());
        Assert.assertEquals(actualVXAsset.getDescription(), expectedVXAssesst.getDescription());
        Assert.assertEquals(actualVXAsset.getActiveStatus(), RangerCommonEnums.STATUS_ENABLED);
}