@Test public void eqTest() throws Exception { LazyImmutableRep us1 = new LazyImmutableRep(text, in("foo")); LazyImmutableRep us2 = new LazyImmutableRep(text, in("foo")); LazyImmutableRep us3 = new LazyImmutableRep(text, in("bar")); Representation them = new BinaryRepresentation(text, in("foo")); assertEquals(true, us1.eq(us1)); assertEquals(true, us1.eq(us2)); assertEquals(false, us1.eq(us3)); assertEquals(false, us1.eq(them)); assertEquals(false, them.eq(us1)); }
@Override public boolean eq(Representation that) { return self.eq(that); }
LazyImmutableRep implements Representation { @Override public boolean eq(Representation that) { return self.eq(that); } }
LazyImmutableRep implements Representation { @Override public boolean eq(Representation that) { return self.eq(that); } LazyImmutableRep(String contentType, InputStream data); }
LazyImmutableRep implements Representation { @Override public boolean eq(Representation that) { return self.eq(that); } 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); }
LazyImmutableRep implements Representation { @Override public boolean eq(Representation that) { return self.eq(that); } 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);  }