i am writing a test for my spring app.

what i wanted to do is pre-fillup a set of javabeans, for example:

Code:
<bean id="name" class="com.Name">
    <set property="firstname">Sample</property>
    <set property="address">Beverly hiils</property>
</bean>

<bean id="grades" class="com.Grades">
    <set property="quarter">1rst Quarter</property>
    <set property="grade">80</property>    
</bean>

my problem is i need to use those bean from my test case.

is there a way to access them like this or any way like this:

Code:
public void testSample&#40;&#41;&#123;
    Name name = context.get&#40;"name"&#41;;
    Grade grade = context.get&#40;"grade"&#41;;
&#125;

any help will be very much appreciated.

thanks a lot in advance.