Unit tests for getType

Also corrected few Provider and Contract implementation