text: Title: Improve test coverage
  Body: <!-- Please use the appropriate issue title format:
      BUG REPORT
      Bug: {Short description of bug}
  
      SUGGESTION
      Suggestion: {Short description of suggestion}
  
      OTHER
      {Question|Discussion|Whatever}: {Short description} -->
  
  
  ## Description
  Currently, the test coverage is around 88% which is okay but we can improve it. This issue focuses on adding tests covering missing branches.
  
  ## People to notify
  @manrajgrover 
  