Q:

Generate java test class from features in cucumber

I am new to cucumber and wanted to understand if there is any plugin to generate java test class code from a cucumber feature file.
Example : I have the below scenario - 
  Scenario: Determine past date
    Given today is 2011-01-20
    When I ask if Jan 19, 2011 is in the past
    Then the result should be yes

Is there a way to generate test class with the methods for each? 
I am just looking to generate the skeleton of the class so that it speeds up the development process.

A:

You can run the feature with a runner class like:
import org.junit.runner.RunWith;

import cucumber.api.CucumberOptions;
import cucumber.api.junit.Cucumber;

@RunWith(Cucumber.class)
@CucumberOptions(
dryRun = false,
strict = true,
plugin = {"pretty"},
features = {"path/to/features"},
glue = {"package.of.steps"},
tags = {"@TagsToRun"})

public class MyCucumberTestRunnner {
    public MyCucumberTestRunnner() {
    }
}

This can be executed as JUnit Test and Cucumber will tell you, that there are missing steps and will provide you the Step Skeletons.
if the glue code is in the same package you dont need to provide the information

