class DataProviderFrameworkMethod extends FrameworkMethod {

    @Override
    public String getName() {
        if (nameFormatter == null || DataProviderPlaceholderFormatter.class.equals(nameFormatter)) {
            return new DataProviderPlaceholderFormatter(nameFormat, Placeholders.all()).format(getMethod(), idx,
                    Arrays.asList(parameters));
        }

        try {
            return nameFormatter.getDeclaredConstructor().newInstance().format(getMethod(), idx,
                    Arrays.asList(parameters));
        } catch (InstantiationException e) {
            throw new IllegalStateException(String
                    .format("Could not instantiate name formatter using default constructor '%s'.", nameFormatter),
                    e);
        } catch (IllegalAccessException e) {
            throw new IllegalStateException(
                    String.format("Default constructor not accessable of name formatter '%s'.", nameFormatter), e);
        } catch (InvocationTargetException e) {
            throw new IllegalStateException(String.format("Default constructor of name formatter '%s' has thrown: %s",
                    nameFormatter, e.getMessage()), e);
        } catch (NoSuchMethodException e) {
            throw new IllegalStateException(
                    String.format("Default constructor not found for name formatter '%s'.", nameFormatter), e);
        } catch (Exception e) {
            throw new IllegalStateException(String.format(
                    "Unexpected exception while finding and invoking default constructor of name formatter '%s': %s",
                    nameFormatter, e.getMessage()), e);
        }
    }

    public  DataProviderFrameworkMethod(Method method, int idx, Object[] parameters, String nameFormat);
    public  DataProviderFrameworkMethod(Method method, int idx, Object[] parameters,
            String nameFormat, Class<? extends DataProviderTestNameFormatter> nameFormatter);

}