So the only role of this class is to check that expected size and actual sizes match? I'm asking, because from having "Leaky" in the name was confusing me. Maybe "StrictByteArrayOutputStream" or "FixedSizeByteArrayOutputStream" (or along the names).