@SuppressWarnings("static-access") @Test public void writeErrorFileTest() throws Exception{ mockStatic(FileManager.class); PowerMockito.doNothing().when(FileManager.class,"generateErrorFile",anyMap()); errorManageUtil.writeErrorFile(); PowerMockito.doThrow(new IOException()).when(FileManager.class,"generateErrorFile",anyMap()); errorManageUtil.writeErrorFile(); }
public static void writeErrorFile(){ try{ FileManager.generateErrorFile(errorMap); }catch(Exception e){ log.error("Error in writeErrorFile",e); } }
ErrorManageUtil { public static void writeErrorFile(){ try{ FileManager.generateErrorFile(errorMap); }catch(Exception e){ log.error("Error in writeErrorFile",e); } } }
ErrorManageUtil { public static void writeErrorFile(){ try{ FileManager.generateErrorFile(errorMap); }catch(Exception e){ log.error("Error in writeErrorFile",e); } } private  ErrorManageUtil(); }
ErrorManageUtil { public static void writeErrorFile(){ try{ FileManager.generateErrorFile(errorMap); }catch(Exception e){ log.error("Error in writeErrorFile",e); } } private  ErrorManageUtil(); static void initialise(); static void finalise(); static synchronized void uploadError(String account, String region, String type, String exception); static void writeErrorFile(); static Map<String,Object> formErrorCode(); }
ErrorManageUtil { public static void writeErrorFile(){ try{ FileManager.generateErrorFile(errorMap); }catch(Exception e){ log.error("Error in writeErrorFile",e); } } private  ErrorManageUtil(); static void initialise(); static void finalise(); static synchronized void uploadError(String account, String region, String type, String exception); static void writeErrorFile(); static Map<String,Object> formErrorCode();  }