### Question:
CompressionStrategy implements BlobStrategy { @Override public byte[] perform(byte[] blob) throws TokenStrategyFailedException { Reject.ifNull(blob); final ByteArrayOutputStream bout = new ByteArrayOutputStream(blob.length); try { final GZIPOutputStream out = new GZIPOutputStream(bout); out.write(blob); out.flush(); out.close(); } catch (IOException e) { throw new TokenStrategyFailedException(e); } return bout.toByteArray(); }  @Override byte[] perform(byte[] blob); @Override byte[] reverse(byte[] blob);  }### Answer:
@Test (expectedExceptions = NullPointerException.class) public void shouldRejectIfNullBlobOnPerform() throws TokenStrategyFailedException { compression.perform(null); }
@Test public void shouldCompressContents() throws TokenStrategyFailedException { assertThat(compression.perform(data).length).isLessThan(data.length); }