### Question:
Utility { public static byte[] read(String filename) throws IOException { BufferedInputStream stream = new BufferedInputStream( new FileInputStream(filename)); byte[] content = read(stream); stream.close(); return (content); } private  Utility(); static String nodeToString(Node node, int type); static String nodeToString(Node node); static Properties readProperties(String[] commandLineArgs); static byte[] read(String filename); static byte[] read(File file); static byte[] read(InputStream in); static DocumentBuilder newDocumentBuilder(); static Element getElement(
            Document owner, String elementName, String nsURI); static String getElementText(
            Document owner, String elementName, String nsURI); static String getStackTrace(Exception e); static HashMap<String, String> stringToMap(String src); static String mapToString(Map src, boolean mask, int type); static Document readRequest(Properties props, String filename); static Document readRequest(Properties props, String filename, String merchantId); static Element createElement(
            Document owner, String nsURI, String elementName, String textValue); static long getResponseIssuedAtTime(String responseTime); static long getResponseTransitTime(long resIssuedAtTime); static String checkIfMTIFiledExist(Document request, String nsURI); static String checkIfAuthServiceFieldExist(Document request, String nsURI); static final String VERSION; static final String ORIGIN_TIMESTAMP; static final String SDK_ELAPSED_TIMESTAMP; static final String RESPONSE_TIME_REPLY; static final String MERCHANT_TRANSACTION_IDENTIFIER; static final String AUTH_SERVICE; static final String AUTH_SERVICE_XML_RUN_ATT; static final String AUTH_SERVICE_NVP; static final String ELEM_MERCHANT_ID; static final String KEY_ALIAS; static final String ELEM_MERCHANT_REFERENCE_CODE; static final String ELEM_CLIENT_LIBRARY; static final String ELEM_CLIENT_LIBRARY_VERSION; static final String ELEM_CLIENT_ENVIRONMENT; static final int HTTP_BAD_REQUEST; static final String MTI_FIELD_ERR_MSG; static final String NVP_LIBRARY; static final String XML_LIBRARY; static final String ENVIRONMENT; }### Answer:
@Test public void testRead() throws Exception { byte[] data = "abcdefhijklmnopqrstuvwxyz".getBytes(); InputStream in = new ByteArrayInputStream(data); byte[] result = Utility.read(in); assertArrayEquals(data, result); }
@Test public void testRead_empty() throws Exception { byte[] data = {}; InputStream in = new ByteArrayInputStream(data); byte[] result = Utility.read(in); assertArrayEquals(data, result); }