Created TagStackFactory class and associated mock objects for testing.