LPS-39004 - tests
LPS-39004 SF
LPS-38959 Fix, it is not required to retrieve from database if required result count is zero
LPS-38959 Source formatting