Utils { public static String jsonOutput(Object data) throws JsonGenerationException, JsonMappingException, IOException { ObjectMapper mapper = new ObjectMapper(); final ByteArrayOutputStream bos = new ByteArrayOutputStream(); mapper.writeValue(bos, data); return bos.toString(); } private  Utils(); static String soapCall(URL url, String soapData, String soapAction,
            String xPathResult); static UserToken decrypt(String message); static String jsonOutput(Object data); static String formatMontant(String montant); static String formatDescription(String desc); static String readFile(File inputFile);  }
@Test public void testJsonOutput() { try { String asJSON = Utils.jsonOutput(Utils.decrypt(TOKEN)); assertNotNull(asJSON); assertEquals(TOKEN_TO_JSON, asJSON); } catch (JsonGenerationException e) { fail(e.getMessage()); } catch (JsonMappingException e) { fail(e.getMessage()); } catch (IOException e) { fail(e.getMessage()); } }