### Question:
B2ByteRange { public static B2ByteRange parse(String s) { if (s == null) { return null; } Matcher matcher = RANGE_PATTERN.matcher(s); if (!matcher.matches()) { return null; } Long start = longOrNullFromStr(matcher.group(1)); Long end = longOrNullFromStr(matcher.group(2)); if (start == null && end == null) { return null; } if (start != null && end != null && end < start) { return null; } return new B2ByteRange(start, end); } B2ByteRange(Long start, Long end); static B2ByteRange startAt(long start); static B2ByteRange between(long start, long end); static B2ByteRange parse(String s); boolean isSatisfied(long entitySize); B2ByteRange effectiveRange(long entitySize); long getNumberOfBytes(); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode(); final Long start; final Long end; }### Answer:
@Test public void testGarbage() { assertNull(B2ByteRange.parse(null)); assertNull(B2ByteRange.parse("garbage")); assertNull(B2ByteRange.parse("bytes=-")); assertNull(B2ByteRange.parse("bytes=5-2")); }