WrapperSdkExceptionManager { public static String loadWrapperExceptionData(UUID errorId) { if (errorId == null) { AppCenterLog.error(LOG_TAG, "Failed to load wrapper exception data: null errorId"); return null; } String data = sWrapperExceptionDataContainer.get(errorId.toString()); if (data != null) { return data; } File dataFile = getFile(errorId); if (dataFile.exists()) { data = FileManager.read(dataFile); if (data != null) { sWrapperExceptionDataContainer.put(errorId.toString(), data); } return data; } return null; } @VisibleForTesting  WrapperSdkExceptionManager(); static UUID saveWrapperException(Thread thread, Throwable throwable, com.microsoft.appcenter.crashes.ingestion.models.Exception modelException, String rawSerializedException); static void deleteWrapperExceptionData(UUID errorId); static String loadWrapperExceptionData(UUID errorId); static String trackException(com.microsoft.appcenter.crashes.ingestion.models.Exception modelException, Map<String, String> properties, Iterable<ErrorAttachmentLog> attachments); static void setAutomaticProcessing(@SuppressWarnings("SameParameterValue") boolean automaticProcessing); static AppCenterFuture<Collection<ErrorReport>> getUnprocessedErrorReports(); static AppCenterFuture<Boolean> sendCrashReportsOrAwaitUserConfirmation(Collection<String> filteredReportIds); static ErrorReport buildHandledErrorReport(Context context, String errorReportId); static void sendErrorAttachments(String errorReportId, Iterable<ErrorAttachmentLog> attachments);  }
@Test public void loadWrapperExceptionData() throws java.lang.Exception { File file = mock(File.class); whenNew(File.class).withAnyArguments().thenReturn(file); when(file.exists()).thenReturn(true); assertNull(WrapperSdkExceptionManager.loadWrapperExceptionData(UUID.randomUUID())); assertNull(WrapperSdkExceptionManager.loadWrapperExceptionData(null)); }