@Test public void testNoPadding() { Calendar calender; Map<String, String> calender_timestamp; calender = Calendar.getInstance(); calender.set(2014, (5 - 1), 3, 13, 46, 33); calender_timestamp = new HashMap<String, String>(); calender_timestamp.put("timestamp", String.valueOf(calender.getTimeInMillis())); SimpleDateFormat format = new SimpleDateFormat("M-d"); String test = "%n-%e"; String escapedString = BucketPath.escapeString( test, calender_timestamp, false, Calendar.HOUR_OF_DAY, 12); Date d = new Date(calender.getTimeInMillis()); String expectedString = format.format(d); calender.set(2014, (11 - 1), 13, 13, 46, 33); calender_timestamp.put("timestamp", String.valueOf(calender.getTimeInMillis())); escapedString += " " + BucketPath.escapeString( test, calender_timestamp, false, Calendar.HOUR_OF_DAY, 12); System.out.println("Escaped String: " + escapedString); d = new Date(calender.getTimeInMillis()); expectedString += " " + format.format(d); System.out.println("Expected String: " + expectedString); Assert.assertEquals(expectedString, escapedString); }
public static String escapeString(String in, Map<String, String> headers) { return escapeString(in, headers, false, 0, 0); }
BucketPath { public static String escapeString(String in, Map<String, String> headers) { return escapeString(in, headers, false, 0, 0); } }
BucketPath { public static String escapeString(String in, Map<String, String> headers) { return escapeString(in, headers, false, 0, 0); }  }
BucketPath { public static String escapeString(String in, Map<String, String> headers) { return escapeString(in, headers, false, 0, 0); }  @VisibleForTesting @Deprecated static boolean containsTag(String in); @VisibleForTesting @Deprecated static String expandShorthand(char c); @VisibleForTesting @Deprecated static String replaceShorthand(char c, Map<String, String> headers); @VisibleForTesting @Deprecated static String replaceShorthand(char c, Map<String, String> headers,
      boolean needRounding, int unit, int roundDown); @VisibleForTesting @Deprecated static String replaceShorthand(char c, Map<String, String> headers,
      TimeZone timeZone, boolean needRounding, int unit, int roundDown,
      boolean useLocalTimestamp); static String escapeString(String in, Map<String, String> headers); static String escapeString(String in, Map<String, String> headers,
      boolean needRounding, int unit, int roundDown); static String escapeString(String in, Map<String, String> headers,
      TimeZone timeZone, boolean needRounding, int unit, int roundDown,
      boolean useLocalTimeStamp); @VisibleForTesting @Deprecated static Map<String, String> getEscapeMapping(String in,
      Map<String, String> headers); @VisibleForTesting @Deprecated static Map<String, String> getEscapeMapping(String in,
      Map<String, String> headers, boolean needRounding,
      int unit, int roundDown); @VisibleForTesting static void setClock(Clock clk); @VisibleForTesting static Clock getClock(); }
BucketPath { public static String escapeString(String in, Map<String, String> headers) { return escapeString(in, headers, false, 0, 0); }  @VisibleForTesting @Deprecated static boolean containsTag(String in); @VisibleForTesting @Deprecated static String expandShorthand(char c); @VisibleForTesting @Deprecated static String replaceShorthand(char c, Map<String, String> headers); @VisibleForTesting @Deprecated static String replaceShorthand(char c, Map<String, String> headers,
      boolean needRounding, int unit, int roundDown); @VisibleForTesting @Deprecated static String replaceShorthand(char c, Map<String, String> headers,
      TimeZone timeZone, boolean needRounding, int unit, int roundDown,
      boolean useLocalTimestamp); static String escapeString(String in, Map<String, String> headers); static String escapeString(String in, Map<String, String> headers,
      boolean needRounding, int unit, int roundDown); static String escapeString(String in, Map<String, String> headers,
      TimeZone timeZone, boolean needRounding, int unit, int roundDown,
      boolean useLocalTimeStamp); @VisibleForTesting @Deprecated static Map<String, String> getEscapeMapping(String in,
      Map<String, String> headers); @VisibleForTesting @Deprecated static Map<String, String> getEscapeMapping(String in,
      Map<String, String> headers, boolean needRounding,
      int unit, int roundDown); @VisibleForTesting static void setClock(Clock clk); @VisibleForTesting static Clock getClock(); static final String TAG_REGEX; static final Pattern tagPattern; }