@Test public void testGetHeader() { HashMap<String, Object> hashMap = new HashMap<>(); hashMap.put("Authorization", "Basic foo"); hashMap.put("Content-Type", "application/json; charset=UTF-8"); Assert.assertEquals(hashMap, Util.getHeader("foo")); }
public static Map<String,Object> getHeader(String base64Creds){ Map<String,Object> authToken = new HashMap<>(); authToken.put("Content-Type", ContentType.APPLICATION_JSON.toString()); authToken.put("Authorization", "Basic "+base64Creds); return authToken; }
Util { public static Map<String,Object> getHeader(String base64Creds){ Map<String,Object> authToken = new HashMap<>(); authToken.put("Content-Type", ContentType.APPLICATION_JSON.toString()); authToken.put("Authorization", "Basic "+base64Creds); return authToken; } }
Util { public static Map<String,Object> getHeader(String base64Creds){ Map<String,Object> authToken = new HashMap<>(); authToken.put("Content-Type", ContentType.APPLICATION_JSON.toString()); authToken.put("Authorization", "Basic "+base64Creds); return authToken; } private  Util(); }
Util { public static Map<String,Object> getHeader(String base64Creds){ Map<String,Object> authToken = new HashMap<>(); authToken.put("Content-Type", ContentType.APPLICATION_JSON.toString()); authToken.put("Authorization", "Basic "+base64Creds); return authToken; } private  Util(); static boolean contains(Map<String, ?> x, Map<String, ?> y, String[] keys); static String concatenate(Map<String, Object> map, String[] keys, String delimiter); static Map<String, Object> parseJson(String json); static String getUniqueID(String idstring); static String getStackTrace(Exception e); static String base64Decode(String encodedStr); static String encodeUrl(String toBeEncoded); static String base64Encode(String str); static Map<String,Object> getHeader(String base64Creds); static List<Map<String, T>> fetchDataFromS3(String s3Account,String s3Region,String s3Role, String bucketName,String path); static List<String> retrieveErrorRecords(String responseStr); }
Util { public static Map<String,Object> getHeader(String base64Creds){ Map<String,Object> authToken = new HashMap<>(); authToken.put("Content-Type", ContentType.APPLICATION_JSON.toString()); authToken.put("Authorization", "Basic "+base64Creds); return authToken; } private  Util(); static boolean contains(Map<String, ?> x, Map<String, ?> y, String[] keys); static String concatenate(Map<String, Object> map, String[] keys, String delimiter); static Map<String, Object> parseJson(String json); static String getUniqueID(String idstring); static String getStackTrace(Exception e); static String base64Decode(String encodedStr); static String encodeUrl(String toBeEncoded); static String base64Encode(String str); static Map<String,Object> getHeader(String base64Creds); static List<Map<String, T>> fetchDataFromS3(String s3Account,String s3Region,String s3Role, String bucketName,String path); static List<String> retrieveErrorRecords(String responseStr);  }