LogRepositoryCustomImpl implements LogRepositoryCustom { public void exportToInputStream(XLog log, String path, String name, XSerializer serializer) { FileOutputStream outputStream; try { File directory = new File(path); if (!directory.exists()) directory.mkdirs(); File file = new File(path + name); if (!file.exists()) file.createNewFile(); outputStream = new FileOutputStream(file); serializer.serialize(log, outputStream); outputStream.close(); } catch (Exception e) { e.printStackTrace(); System.out.println("Error"); } }  @Override @SuppressWarnings("unchecked") List<Log> findAllLogs(final String conditions); @Override @SuppressWarnings("unchecked") List<Log> findAllLogsByFolder(final Integer folderId, final String userRowGuid, final String conditions); @Override String storeProcessLog(final Integer folderId, final String logName, XLog log, final Integer userID,
                                  final String domain, final String created); void deleteProcessLog(Log log); XLog getProcessLog(Log log, String factoryName); APMLog getAggregatedLog(Log log); String getLayoutByLogId(Integer logId, Integer userId); XLog importFromFile(XFactory factory, String location); void exportToFile(String path, String name, XLog log); XLog importFromInputStream(InputStream inputStream, XParser parser); void exportToInputStream(XLog log, String path, String name, XSerializer serializer);  }
@Test public void exportToInputStream() { }