### Question:
CustomTaskFactory implements DefinitionFactory<CustomTask> { @Override public boolean accepts(final String identifier) { return identifier.startsWith(PREFIX); } protected  CustomTaskFactory(); @Inject  CustomTaskFactory(final Instance<WorkItemDefinitionRegistry> registry);  CustomTaskFactory(final Supplier<WorkItemDefinitionRegistry> registry); @Override boolean accepts(final String identifier); @Override CustomTask build(final String identifier); CustomTask buildItem(final String workItemName);  }### Answer:
@Test public void testAccepts() { assertFalse(tested.accepts(getId(UserTask.class))); assertFalse(tested.accepts(getId(NoneTask.class))); assertFalse(tested.accepts(getId(ScriptTask.class))); assertFalse(tested.accepts(getId(BusinessRuleTask.class))); assertTrue(tested.accepts(getId(CustomTask.class))); assertTrue(tested.accepts(getId(CustomTask.class) + ".Email")); assertTrue(tested.accepts(getId(CustomTask.class) + ".Log")); assertTrue(tested.accepts(getWorkItemDefinitionName())); }