@Test
@Ignore("Because it does not always succeed due to usage of random bytes")
public void testCompressibility()
        throws IOException, RepositoryException {

    byte[] comp256KB = compressibleData(256*1024);
    byte[] incomp256KB = incompressibleData(256*1024);
    assertTrue(isCompressible(newArtifact(comp256KB, COMPRESSIBLE_MIME_TYPE)) > 0);
    assertTrue(isCompressible(newArtifact(comp256KB, UNKNOWN_MIME_TYPE)) > 0);
    assertTrue(isCompressible(newArtifact(comp256KB, null)) > 0);
    assertTrue(isCompressible(newArtifact(new byte[10], null)) == 0);
    assertTrue(isCompressible(newArtifact(incomp256KB, UNKNOWN_MIME_TYPE)) < 0);
    assertTrue(isCompressible(newArtifact(incomp256KB, INCOMPRESSIBLE_MIME_TYPE)) < 0);
}