Disposing SQL command and closing the connection
To "fix" your issue with the DataTable, perhaps you could modify your function.
public static void GetByID(DataTable table, int testID){ // bla bla bla}// calling the functionusing(DataTable table = new DataTable()){ TestService.GetByID(table, 5);}
Not saying this is the optimal solution, but it will solve the complaint.