diff --git a/applications/test/TestTools/TestTools.H b/applications/test/TestTools/TestTools.H
new file mode 100644
index 0000000000..c24cb9fa05
--- /dev/null
+++ b/applications/test/TestTools/TestTools.H
@@ -0,0 +1,305 @@
+/*---------------------------------------------------------------------------*\
+ ========= |
+ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
+ \\ / O peration |
+ \\ / A nd | www.openfoam.com
+ \\/ M anipulation |
+-------------------------------------------------------------------------------
+ Copyright (C) 2020 OpenCFD Ltd.
+-------------------------------------------------------------------------------
+License
+ This file is part of OpenFOAM.
+
+ OpenFOAM is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with OpenFOAM. If not, see .
+
+Description
+ Various tools for test applications.
+
+\*---------------------------------------------------------------------------*/
+
+using namespace Foam;
+
+#include "Random.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+// Total number of unit tests
+unsigned nTest_ = 0;
+
+
+// Total number of failed unit tests
+unsigned nFail_ = 0;
+
+
+// Create a non-complex random Matrix.
+template
+typename std::enable_if
+<
+ !std::is_same:: value,
+ MatrixType
+>::type makeRandomMatrix
+(
+ const labelPair& dims,
+ Random& rndGen
+)
+{
+ MatrixType mat(dims);
+
+ std::generate
+ (
+ mat.begin(),
+ mat.end(),
+ [&]{return rndGen.GaussNormal();}
+ );
+
+ return mat;
+}
+
+
+// Create a complex random Matrix.
+template
+typename std::enable_if
+<
+ std::is_same:: value,
+ MatrixType
+>::type makeRandomMatrix
+(
+ const labelPair& dims,
+ Random& rndGen
+)
+{
+ MatrixType mat(dims);
+
+ for (auto& x : mat)
+ {
+ x = complex(rndGen.GaussNormal(), rndGen.GaussNormal());
+ }
+
+ return mat;
+}
+
+
+// Copy an initializer list into a DiagonalMatrix
+template
+void assignMatrix
+(
+ UList& A,
+ std::initializer_list list
+)
+{
+ std::copy(list.begin(), list.end(), A.begin());
+}
+
+
+// Copy an initializer list into a SymmetricSquareMatrix.
+template
+void assignMatrix
+(
+ Matrix