MultiRowExceptions extends ThemisException { public static String constructMessage(Map<TableAndRow, IOException> exceptions) { String message = ""; for (Entry<TableAndRow, IOException> rowException : exceptions.entrySet()) { message += ("tableAndRow=" + rowException.getKey() + ", exception=" + rowException.getValue() + "\n"); } return message; } MultiRowExceptions(String msg, Map<TableAndRow, IOException> exceptions); Map<TableAndRow, IOException> getExceptions(); static String constructMessage(Map<TableAndRow, IOException> exceptions);  }
@Test public void testConstructMessage() { Map<TableAndRow, IOException> exceptions = new TreeMap<TableAndRow, IOException>(); exceptions.put(new TableAndRow(TABLENAME, ROW), new IOException("exceptionA")); exceptions.put(new TableAndRow(TABLENAME, ANOTHER_ROW), new IOException("exceptionB")); System.out.println(MultiRowExceptions.constructMessage(exceptions)); }