Signature { public static String signature(String timestamp, String pathWithQuery, String secret) { String stringToSign = timestamp + DELIMITER + pathWithQuery; return HmacSha1Utils.signString(stringToSign, secret); }  static String signature(String timestamp, String pathWithQuery, String secret); static Map<String, String> buildHttpHeaders(String url, String appId, String secret); static final String HTTP_HEADER_TIMESTAMP; }
@Test public void testSignature() { String timestamp = "1576478257344"; String pathWithQuery = "/configs/100004458/default/application?ip=10.0.0.1"; String secret = "df23df3f59884980844ff3dada30fa97"; String actualSignature = Signature.signature(timestamp, pathWithQuery, secret); String expectedSignature = "EoKyziXvKqzHgwx+ijDJwgVTDgE="; assertEquals(expectedSignature, actualSignature); }