An abstract class seems like a really heavy-handed solution. What about an enum?
```java
public enum TestIdentifierAdapter {
  JUNIT() {
    @Override public String adapt(String className) {
      // ...
    }
  },
  CUCUMBER() {
    @Override public String adapt(String className) {
      // ...
    }
  }

  public static TestIdentifierAdapter fromTestRunner(String name) {
    return CUCUMBER_NAME.equals(name) ? CUCUMBER : JUNIT;
  }

  public abstract String adapt(String className);
}
```