Sample Code:
Account acct = new Account(Name = ‘Test’);
insert acct;
apexpages.currentpage().getparameters().put(‘Aid’ , acct.Id);
Class_Name controller = new Class_Name() ;
Cheers!!!