Add assertion for arraysearch method and test case for invert method in UT.