void () { final Object foo = new Object(); final Object bar = new Object(); ElementPattern objectPattern = object().equalTo(foo); assertTrue(objectPattern.accepts(foo)); assertFalse(objectPattern.accepts(bar)); ElementPattern stringPattern = string().equalTo("foo"); assertTrue(stringPattern.accepts("foo")); assertFalse(stringPattern.accepts("bar")); }