   std::unordered_map<key_type, value_type> expected_values;
 
   GroupByTest(const size_type hash_table_size = 10000)
-    : size(hash_table_size), the_map(new map_type(hash_table_size))
+    : size(hash_table_size), the_map(new map_type(hash_table_size, op_type::IDENTITY))
   {
   }
 
-  void create_input(const int num_unique_keys, const int num_values_per_key, const int ratio = 1, const int max_key = RAND_MAX, const int max_value = RAND_MAX)
+  std::pair<key_type*, value_type*>
+  create_input(const int num_unique_keys, const int num_values_per_key, const int ratio = 1, const int max_key = RAND_MAX, const int max_value = RAND_MAX)
   {
 
     const int TOTAL_PAIRS = num_unique_keys * num_values_per_key;
-
-    this->the_map.reset(new map_type(ratio*TOTAL_PAIRS));
+    size = TOTAL_PAIRS;
+
+    this->the_map.reset(new map_type(ratio*TOTAL_PAIRS, unused_value));
 
     groupby_column.reserve(TOTAL_PAIRS);
     aggregation_column.reserve(TOTAL_PAIRS);

        // Don't use unused_value
        while(current_value == this->unused_value)
        {
          current_value = std::rand();
        }

        // Store current key and value
        groupby_column.push_back(current_key);
        aggregation_column.push_back(current_value);

        // Use a STL map to keep track of the max value for each key
        auto found = expected_values.find(current_key);

        // Key doesn't exist yet, insert it

// and you can't have a device lambda inside a private member
// function
template<typename value_type>
struct max_op
{
  constexpr static value_type IDENTITY{std::numeric_limits<value_type>::min()};

  __host__ __device__
    value_type operator()(value_type a, value_type b)
    {
      return (a > b? a : b);
    }
};

template<typename value_type>
struct min_op
{
  constexpr static value_type IDENTITY{std::numeric_limits<value_type>::max()};

  __host__ __device__
    value_type operator()(value_type a, value_type b)
    {
      return (a < b? a : b);
    }
};

// A new instance of this class will be created for each *TEST(GroupByTest, ...)
// Put all repeated stuff for each test here
