Refactored line fitting tests.

Signed-off-by: Nikolay Lyalyushkin <nikolay.lyalyushkin@intel.com>