simplify provider_by_default_constructor_test

Signed-off-by: Rafał Malinowski <rafal.przemyslaw.malinowski@gmail.com>
use asserts for implementation

Signed-off-by: Rafał Malinowski <rafal.przemyslaw.malinowski@gmail.com>
add tests for provider_by_factory

Signed-off-by: Rafał Malinowski <rafal.przemyslaw.malinowski@gmail.com>
replace invalid_type_exception with new exception

Signed-off-by: Rafał Malinowski <rafal.przemyslaw.malinowski@gmail.com>