我目前正在针对junit测试(学校作业)进行编程
任务是创建一个处理作业分配的有状态会话bean
submitAssignments 方法应该丢弃会话 bean,以便 junit 测试工作
jobManagementBean.submitAssignments();
// check if the bean was discarded after submitAssignments() was
// called successfully!
try {
jobManagementBean.getCache();
fail(NoSuchEJBException.class.getName() + " expected!");
} catch (NoSuchEJBException e) {
// Expected
}
我怎样才能丢弃豆子?