//go:generate counterfeiter -o nodeinforetriever.gen.go --fake-name NodeInfoRetriever . nodeInfoRetriever
generate counterfeiter -o nodeinforetriever.gen.go --fake-name NodeInfoRetriever . nodeInfoRetriever
// go : generate counterfeiter - o nodeinforetriever . gen . go -- fake - name NodeInfoRetriever . nodeInfoRetriever
func TestNewHandler(t *testing.T) {
	t.Run("V2.0", func(t *testing.T) {
		h := NewHandler(V2_0, &NodeInfoRetriever{}, nil)
		require.NotNil(t, h)
		require.Equal(t, http.MethodGet, h.Method())
		require.Equal(t, "/nodeinfo/2.0", h.Path())
		require.NotNil(t, h.Handler())
	})
	t.Run("V2.1", func(t *testing.T) {
		h := NewHandler(V2_1, &NodeInfoRetriever{}, nil)
		require.NotNil(t, h)
		require.Equal(t, http.MethodGet, h.Method())
		require.Equal(t, "/nodeinfo/2.1", h.Path())
		require.NotNil(t, h.Handler())
	})
}
func TestNewHandler ( t * testing . T ) { t . Run ( " " , func ( t * testing . T ) { h := NewHandler ( V2_0 , & NodeInfoRetriever { } , nil ) require . NotNil ( t , h ) require . Equal ( t , http . MethodGet , h . Method ( ) ) require . Equal ( t , " " , h . Path ( ) ) require . NotNil ( t , h . Handler ( ) ) } ) t . Run ( " " , func ( t * testing . T ) { h := NewHandler ( V2_1 , & NodeInfoRetriever { } , nil ) require . NotNil ( t , h ) require . Equal ( t , http . MethodGet , h . Method ( ) ) require . Equal ( t , " " , h . Path ( ) ) require . NotNil ( t , h . Handler ( ) ) } ) }
generate counterfeiter -o nodeinforetriever.gen.go --fake-name NodeInfoRetriever .
generate counterfeiter - o nodeinforetriever . gen . go -- fake - name NodeInfoRetriever .