code: @SuppressWarnings({"ThrowableInstanceNeverThrown"})
      public static void validatePrimitiveArray(Method method, Class type, List<Throwable> errors)
      {
          Class returnType = method.getReturnType();
          if (!returnType.isArray() || !returnType.getComponentType().equals(type))
          {
              errors.add(new Exception("Method " + method.getName() + "() should return " + type.getName() + "[]"));
          }
      }
docs: Validate that a method returns primitive array of specific type.
  
  @param method the method to be tested
  @param errors a list to place the errors