Added Unit tests for updated code related to [issue #40] and [issue #41].