LazyImmutableRep implements Representation { @Override public String contentType() { return self.contentType(); } LazyImmutableRep(String contentType, InputStream data); byte[] head(int n); byte[] get(); @Override String contentType(); @Override void write(OutputStream out); @Override String show(); @Override boolean eq(Representation that);  }
@Test public void contentTypeTest() throws Exception { String contentType = String.valueOf(Math.random()); LazyImmutableRep rep = new LazyImmutableRep(contentType, in("foo")); assertEquals(contentType, rep.contentType()); }