### Question:
SizeHelper { @Nonnull public String getAsKB (final long nSize) { return _format (nSize / CGlobal.BYTES_PER_KILOBYTE) + KB_SUFFIX; } SizeHelper(@Nonnull final Locale aDisplayLocale);  SizeHelper(@Nonnull final DecimalFormatSymbols aDFS); @Nonnull String getAsKB(final long nSize); @Nonnull String getAsKB(final long nSize, @Nonnegative final int nDecimals); @Nonnull String getAsMB(final long nSize); @Nonnull String getAsMB(final long nSize, @Nonnegative final int nDecimals); @Nonnull String getAsGB(final long nSize); @Nonnull String getAsGB(final long nSize, @Nonnegative final int nDecimals); @Nonnull String getAsTB(final long nSize); @Nonnull String getAsTB(final long nSize, @Nonnegative final int nDecimals); @Nonnull String getAsPB(final long nSize); @Nonnull String getAsPB(final long nSize, @Nonnegative final int nDecimals); @Nonnull String getAsMatching(@Nonnull final BigInteger aSize); @Nonnull String getAsMatching(@Nonnull final BigInteger aSize, @Nonnegative final int nDecimals); @Nonnull String getAsMatching(@Nonnull final BigDecimal aSize); @Nonnull String getAsMatching(@Nonnull final BigDecimal aSize, @Nonnegative final int nDecimals); @Nonnull String getAsMatching(final long nSize); @Nonnull String getAsMatching(final long nSize, @Nonnegative final int nDecimals); @Override String toString(); @Nonnull static SizeHelper getSizeHelperOfLocale(@Nonnull final Locale aDisplayLocale); static final String B_SUFFIX; static final String KB_SUFFIX; static final String MB_SUFFIX; static final String GB_SUFFIX; static final String TB_SUFFIX; static final String PB_SUFFIX; }### Answer:
@SuppressFBWarnings ("TQ_NEVER_VALUE_USED_WHERE_ALWAYS_REQUIRED") @Test public void testGetAsKB () { final SizeHelper aSH = SizeHelper.getSizeHelperOfLocale (Locale.ENGLISH); try { aSH.getAsKB (5 * CGlobal.BYTES_PER_KILOBYTE, -1); fail (); } catch (final IllegalArgumentException ex) {} assertEquals ("0KB", aSH.getAsKB (0)); assertEquals ("5KB", aSH.getAsKB (5 * CGlobal.BYTES_PER_KILOBYTE)); assertEquals ("2KB", aSH.getAsKB (2 * CGlobal.BYTES_PER_KILOBYTE)); assertEquals ("1KB", aSH.getAsKB (2 * CGlobal.BYTES_PER_KILOBYTE - 1)); assertEquals ("1024KB", aSH.getAsKB (1 * CGlobal.BYTES_PER_MEGABYTE)); assertEquals ("0.00KB", aSH.getAsKB (0, 2)); assertEquals ("5KB", aSH.getAsKB (5 * CGlobal.BYTES_PER_KILOBYTE, 0)); assertEquals ("5.0KB", aSH.getAsKB (5 * CGlobal.BYTES_PER_KILOBYTE, 1)); assertEquals ("5.00KB", aSH.getAsKB (5 * CGlobal.BYTES_PER_KILOBYTE, 2)); assertEquals ("5.000KB", aSH.getAsKB (5 * CGlobal.BYTES_PER_KILOBYTE, 3)); assertEquals ("5.0000KB", aSH.getAsKB (5 * CGlobal.BYTES_PER_KILOBYTE, 4)); assertEquals ("2.00KB", aSH.getAsKB (2 * CGlobal.BYTES_PER_KILOBYTE, 2)); assertEquals ("1.99KB", aSH.getAsKB (2 * CGlobal.BYTES_PER_KILOBYTE - 10, 2)); assertEquals ("1024.00KB", aSH.getAsKB (1 * CGlobal.BYTES_PER_MEGABYTE, 2)); }