StringEndsWith extends SimpleQuery<O, A> { public StringEndsWith(Attribute<O, A> attribute, A value) { super(attribute); this.value = checkQueryValueNotNull(value); } StringEndsWith(Attribute<O, A> attribute, A value); A getValue(); @SuppressWarnings("unused") boolean matchesValue(A aValue, QueryOptions queryOptions); @Override boolean equals(Object o); @Override String toString();  }
@Test public void testStringEndsWith() { Attribute<String, String> stringIdentity = new SelfAttribute<String>(String.class, "identity"); assertTrue(endsWith(stringIdentity, "TEST").matches("THIS IS A TEST", noQueryOptions())); assertFalse(endsWith(stringIdentity, "THIS").matches("THIS IS A TEST", noQueryOptions())); assertFalse(endsWith(stringIdentity, "TES").matches("THIS IS A TEST", noQueryOptions())); assertTrue(endsWith(stringIdentity, "").matches("THIS IS A TEST", noQueryOptions())); assertTrue(endsWith(stringIdentity, "").matches("", noQueryOptions())); assertFalse(endsWith(stringIdentity, "TEST").matches("", noQueryOptions())); }