Replace NullPointerException by std::exception
Test Factory Part 1