source/base: Refactor out callback routine

The callback mechanism will be used by other callback methods in the
same fashion, so we can template and re-use this functionality
diff --git a/test/Makefile.am b/test/Makefile.am
index d1923fa..4b94144 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -27,6 +27,11 @@
 internal_sdref_CPPFLAGS = $(gtest_cppflags)
 internal_sdref_LDADD = $(gtest_ldadd)
 
+check_PROGRAMS += internal_utils
+internal_utils_SOURCES = internal/utils.cpp
+internal_utils_CPPFLAGS = $(gtest_cppflags)
+internal_utils_LDADD = $(gtest_ldadd)
+
 check_PROGRAMS += source_base
 source_base_SOURCES = source/base.cpp
 source_base_CPPFLAGS = $(gtest_cppflags)