### Question:
UdfFuncService extends BaseService { public Result verifyUdfFuncByName(String name) { Result result = new Result(); if (checkUdfFuncNameExists(name)) { logger.error("UDF function name:{} has exist, can't create again.", name); putMsg(result, Status.UDF_FUNCTION_EXISTS); } else { putMsg(result, Status.SUCCESS); } return result; }  Result createUdfFunction(User loginUser,
                                    String funcName,
                                    String className,
                                    String argTypes,
                                    String database,
                                    String desc,
                                    UdfType type,
                                    int resourceId); Map<String, Object> queryUdfFuncDetail(int id); Map<String, Object> updateUdfFunc(int udfFuncId,
                                             String funcName,
                                             String className,
                                             String argTypes,
                                             String database,
                                             String desc,
                                             UdfType type,
                                             int resourceId); Map<String, Object> queryUdfFuncListPaging(User loginUser, String searchVal, Integer pageNo, Integer pageSize); Map<String, Object> queryResourceList(User loginUser, Integer type); @Transactional(rollbackFor = RuntimeException.class) Result delete(int id); Result verifyUdfFuncByName(String name);  }### Answer:
@Test public void testVerifyUdfFuncByName(){ Mockito.when(udfFuncMapper.queryUdfByIdStr(null, "UdfFuncServiceTest")).thenReturn(getList()); Result result = udfFuncService.verifyUdfFuncByName("test"); logger.info(result.toString()); Assert.assertEquals(Status.SUCCESS.getMsg(),result.getMsg()); result = udfFuncService.verifyUdfFuncByName("UdfFuncServiceTest"); logger.info(result.toString()); Assert.assertEquals(Status.UDF_FUNCTION_EXISTS.getMsg(),result.getMsg()); }