public List<String> stub(List<String> storyLines)
    {
        Set<String> usedStoryTags = new TreeSet<String>();
        List<String> methods = new ArrayList<String>();

        String lastTag = null;
        for (String line : storyLines)
        {
        	String lowerCaseLine = line.toLowerCase();
            String method = null;
        	
        	if (lowerCaseLine.startsWith(GIVEN))
        	{
        		method = createMethodIfNew(GIVEN, GIVEN.length(), line, usedStoryTags);
        		lastTag = GIVEN;
        	} else if (lowerCaseLine.startsWith(WHEN))
        	{
                method = createMethodIfNew(WHEN, WHEN.length(), line, usedStoryTags);
        		lastTag = WHEN;
        	} else if (lowerCaseLine.startsWith(THEN))
        	{
                method = createMethodIfNew(THEN, THEN.length(),line, usedStoryTags);
        		lastTag = THEN;
        	} else if (lowerCaseLine.startsWith(AND))
        	{
                method = createMethodIfNew(lastTag == null ? "unknown" : lastTag, AND.length(), line, usedStoryTags);
        	}
            if (method != null)
            {
                methods.add(method);
            }
        }

        return methods;
    }