### Question:
InjectEntitySelectSupportWorker implements ComponentClassTransformWorker2 { String stripCriteriaIfPresent(String name) { if(name.endsWith("Criteria") && !name.startsWith("Criteria")) { name = name.replaceAll("Criteria$", ""); } return name; } InjectEntitySelectSupportWorker(final EntityDAOLocator locator); void transform(PlasticClass plasticClass, TransformationSupport support, MutableComponentModel model);  }### Answer:
@Test public void strip_criteria_if_present() { EntityDAOLocator locator = newMock(EntityDAOLocator.class); InjectEntitySelectSupportWorker worker = new InjectEntitySelectSupportWorker(locator); assertEquals(worker.stripCriteriaIfPresent("something"), "something"); assertEquals(worker.stripCriteriaIfPresent("myCriteria"), "my"); assertEquals(worker.stripCriteriaIfPresent("criteria"), "criteria"); assertEquals(worker.stripCriteriaIfPresent("Criteria"), "Criteria"); }