public class CreateTestData {
List<Account> acctList = new List<Account>();
List<Opportunity> oppList = new List<Opportunity>();
List<Client_Plan__c> clientList = new List<Client_Plan__c>();
List<Client_Plan_Product__c> clientProdList = new List<Client_Plan_Product__c>();
List<Tasting__c> tasteList = new List<Tasting__c>();
List<Tasting_Product__c> tasteProdList = new List<Tasting_Product__c>();
public List<Account> CreateAccount(String testName, Integer count) {
for (Integer i = 0; i < count; i++) {
Account acct = new Account(name = (testName + i) );
acctList.add(acct);
}
insert(acctList);
return acctList;
}
public list<Opportunity> CreateOpportunity(String testName, Integer count) {
if(acctList==NULL) {
CreateAccount(testName, count);
}
for (Account acct :acctList) {
for(Integer i = 0; i <count; i++) {
Opportunity opp = new Opportunity(Name = (testName+count), AccountId = acct.id);
oppList.add(opp);
}
}
insert(oppList);
return oppList;
}
public list<Client_Plan__c> CreateClient(String testName, Integer count) {
if(acctList==NULL) {
CreateAccount(testName, count);
}
for(Integer i = 0; i <count; i++) {
Client_Plan__c plan = new Client_Plan__c(Name = (testName+count), Account__c = acctList[i].id);
ClientList.add(plan);
}
insert(ClientList);
return (ClientList);
}
}

I think what you really mean is to encapsulate your test logic inside a test class by using Test Utility classes. see docs here:https://www.salesforce.com/us/developer/docs/apexcode/Content/apex_testing_utility_classes.htmhttp://www.salesforce.com/us/developer/docs/apex_workbook/Content/apex_testing_1.htmAnd you're right each action should be in a method and each class should follow the Single Responsibility Principle.Cyrus Twww.levementum.com