unit test method for input parser