### Question:
HtmlDimensions { public static String formatSize(String size) { if (size != null) { String incomingSize = size.trim(); if (incomingSize.length() > 0) { char lastChar = incomingSize.charAt(incomingSize.length() - 1); if (Character.isDigit(lastChar)) { return incomingSize + "px"; } } } return size; } private  HtmlDimensions(); static Double decode(String size); static String formatPx(Double value); static String formatPct(Double value); static String formatSize(String size);  }### Answer:
@Test public void testFormatSize() { assertEquals("100px", HtmlDimensions.formatSize("100")); assertEquals("100px", HtmlDimensions.formatSize("100 ")); assertEquals("100px", HtmlDimensions.formatSize(" 100")); assertEquals("100px", HtmlDimensions.formatSize(" 100 ")); assertEquals("t100px", HtmlDimensions.formatSize("t100")); assertEquals("r100px", HtmlDimensions.formatSize("r100 ")); assertEquals("100px ", HtmlDimensions.formatSize("100px ")); assertEquals(" 100px", HtmlDimensions.formatSize(" 100px")); assertEquals(" 100px ", HtmlDimensions.formatSize(" 100px ")); assertEquals("100px", HtmlDimensions.formatSize("100px")); assertEquals("100 px", HtmlDimensions.formatSize("100 px")); assertEquals("99%", HtmlDimensions.formatSize("99%")); assertEquals("99 %", HtmlDimensions.formatSize("99 %")); assertEquals("100em", HtmlDimensions.formatSize("100em")); assertEquals("size", HtmlDimensions.formatSize("size")); assertEquals("", HtmlDimensions.formatSize("")); assertEquals(" ", HtmlDimensions.formatSize(" ")); assertEquals(null, HtmlDimensions.formatSize(null)); }