Code not covered by tests

Added tests to cover code