package debugv1 import ( "context" "testing" ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1" "github.com/prysmaticlabs/prysm/beacon-chain/rpc/testutil" sharedtestutil "github.com/prysmaticlabs/prysm/shared/testutil" "github.com/prysmaticlabs/prysm/shared/testutil/assert" "github.com/prysmaticlabs/prysm/shared/testutil/require" ) func TestGetBeaconState(t *testing.T) { fakeState, err := sharedtestutil.NewBeaconState() require.NoError(t, err) server := &Server{ StateFetcher: &testutil.MockFetcher{ BeaconState: fakeState, }, } resp, err := server.GetBeaconState(context.Background(), ðpb.StateRequest{ StateId: make([]byte, 0), }) require.NoError(t, err) assert.NotNil(t, resp) }