3 * Copyright (C) 2014 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
7 * The contents of this file are subject to the Mozilla Public License Version 1.1
8 * See LICENSE.TXT at the top of this package for the full license terms.
10 package eu
.etaxonomy
.taxeditor
.session
;
12 import java
.util
.ArrayList
;
13 import java
.util
.Iterator
;
14 import java
.util
.List
;
17 import java
.util
.UUID
;
19 import org
.apache
.log4j
.Logger
;
20 import org
.hibernate
.collection
.spi
.PersistentCollection
;
21 import org
.junit
.Assert
;
22 import org
.junit
.BeforeClass
;
23 import org
.junit
.Test
;
24 import org
.unitils
.dbunit
.annotation
.DataSet
;
26 import eu
.etaxonomy
.cdm
.api
.application
.CdmApplicationState
;
27 import eu
.etaxonomy
.cdm
.api
.service
.ICommonService
;
28 import eu
.etaxonomy
.cdm
.api
.service
.IPolytomousKeyNodeService
;
29 import eu
.etaxonomy
.cdm
.api
.service
.IPolytomousKeyService
;
30 import eu
.etaxonomy
.cdm
.api
.service
.ITaxonService
;
31 import eu
.etaxonomy
.cdm
.api
.service
.ITermService
;
32 import eu
.etaxonomy
.cdm
.api
.service
.IUserService
;
33 import eu
.etaxonomy
.cdm
.api
.service
.IVocabularyService
;
34 import eu
.etaxonomy
.cdm
.model
.agent
.AgentBase
;
35 import eu
.etaxonomy
.cdm
.model
.agent
.Person
;
36 import eu
.etaxonomy
.cdm
.model
.common
.CdmBase
;
37 import eu
.etaxonomy
.cdm
.model
.common
.Credit
;
38 import eu
.etaxonomy
.cdm
.model
.common
.DefinedTermBase
;
39 import eu
.etaxonomy
.cdm
.model
.common
.Extension
;
40 import eu
.etaxonomy
.cdm
.model
.common
.IdentifiableSource
;
41 import eu
.etaxonomy
.cdm
.model
.common
.Language
;
42 import eu
.etaxonomy
.cdm
.model
.common
.LanguageString
;
43 import eu
.etaxonomy
.cdm
.model
.common
.TermType
;
44 import eu
.etaxonomy
.cdm
.model
.common
.TermVocabulary
;
45 import eu
.etaxonomy
.cdm
.model
.description
.KeyStatement
;
46 import eu
.etaxonomy
.cdm
.model
.description
.PolytomousKey
;
47 import eu
.etaxonomy
.cdm
.model
.description
.PolytomousKeyNode
;
48 import eu
.etaxonomy
.cdm
.model
.media
.Rights
;
49 import eu
.etaxonomy
.cdm
.model
.taxon
.Taxon
;
50 import eu
.etaxonomy
.taxeditor
.httpinvoker
.RemotingSessionAwareTest
;
51 import eu
.etaxonomy
.taxeditor
.httpinvoker
.TestThread
;
59 public class CdmEntitySessionAwareTest
extends RemotingSessionAwareTest
{
61 private static final Logger logger
= Logger
.getLogger(CdmEntitySessionAwareTest
.class);
63 UUID polytomousKeyUuid
= UUID
.fromString("0d53ba20-7de4-4baa-bd8a-401048447d66");
64 UUID subKeyUuid
= UUID
.fromString("9d8bf4f6-a70a-4b80-8556-2ccfb436ff01");
65 //UUID polytomousKeyUuid = UUID.fromString("bab66772-2c83-428a-bb6d-655d12ac6097");
66 UUID taxon1Uuid
= UUID
.fromString("2b336df7-29e8-4f79-985f-66502739d22f");
67 UUID personUuid
= UUID
.fromString("945d08f2-eb92-45b6-9252-6275ea6d338b");
71 IPolytomousKeyService polytomousKeyService
= getRemoteApplicationController().getPolytomousKeyService();
72 IPolytomousKeyNodeService polytomousKeyNodeService
= getRemoteApplicationController().getPolytomousKeyNodeService();
73 ICommonService commonService
= getRemoteApplicationController().getCommonService();
74 ITaxonService taxonService
= getRemoteApplicationController().getTaxonService();
75 IVocabularyService vocabularyService
= getRemoteApplicationController().getVocabularyService();
76 ITermService termService
= getRemoteApplicationController().getTermService();
77 IUserService userService
= getRemoteApplicationController().getUserService();
79 //Language english = Language.getLanguageFromUuid(Language.uuidEnglish);
84 public static void initializePolytomousKeyTest() {
89 public void readAllPolytomousKeys() {
90 List
<PolytomousKey
> pKeys
= polytomousKeyService
.list(PolytomousKey
.class, null, null, null, null);
91 Iterator
<PolytomousKey
> pKeysItr
= pKeys
.iterator();
92 Assert
.assertEquals(pKeysItr
.next().getUuid(),UUID
.fromString("9d8bf4f6-a70a-4b80-8556-2ccfb436ff01"));
93 Assert
.assertEquals(pKeysItr
.next().getUuid(),UUID
.fromString("0d53ba20-7de4-4baa-bd8a-401048447d66"));
98 //@DataSet("PolytomousKeyTest.readPolytmousKeyData.xml")
99 public void readPolytmousKeyData() {
100 PolytomousKey pKey
= CdmBase
.deproxy(polytomousKeyService
.find(polytomousKeyUuid
),PolytomousKey
.class);
101 Set
<Taxon
> taxonomicScope
= pKey
.getTaxonomicScope();
102 Iterator
<Taxon
> tsItr
= taxonomicScope
.iterator();
103 Taxon taxon
= tsItr
.next();
105 Assert
.assertEquals("Achillea sec. Cyprus", taxon
.getTitleCache());
106 Assert
.assertEquals(tsItr
.hasNext(), false);
108 List
<Credit
> credits
= pKey
.getCredits();
109 AgentBase agent
= credits
.get(0).getAgent();
110 Assert
.assertEquals(agent
.getId(),4809);
111 Assert
.assertEquals(agent
.getTitleCache(),"R. A. Graham");
112 Assert
.assertEquals(credits
.get(0).getText(),"Credits Text Test");
114 Set
<Extension
> exts
= pKey
.getExtensions();
115 Iterator
<Extension
> extItr
= exts
.iterator();
116 Extension ext
= extItr
.next();
117 Assert
.assertEquals(ext
.getValue(), "http://test.com");
119 Set
<Rights
> rights
= pKey
.getRights();
120 Iterator
<Rights
> rightsItr
= rights
.iterator();
121 Rights right
= rightsItr
.next();
122 Assert
.assertEquals(right
.getText(),"Rights Text Test");
124 Set
<IdentifiableSource
> sources
= pKey
.getSources();
125 Iterator
<IdentifiableSource
> sourcesItr
= sources
.iterator();
126 IdentifiableSource source
= sourcesItr
.next();
127 Assert
.assertEquals(source
.getId(), 23710);
128 source
= sourcesItr
.next();
129 Assert
.assertEquals(source
.getId(), 23711);
131 // TO DO : Added tests for Annotations , Markers
137 public void readPolytomousKeyDataFromNodes() {
138 PolytomousKey pKey
= CdmBase
.deproxy(polytomousKeyService
.find(polytomousKeyUuid
),PolytomousKey
.class);
139 PolytomousKeyNode rootNode
= pKey
.getRoot();
142 Assert
.assertEquals(rootNode
.getId(), 2750);
144 Assert
.assertEquals(rootNode
.getChildAt(0).getId(), 2751);
145 Assert
.assertEquals(rootNode
.getChildAt(0).getParent().getId(), rootNode
.getId());
146 Assert
.assertEquals(rootNode
.getKey().getId(), pKey
.getId());
147 Integer sortIndex
= (Integer
)getFieldValueViaReflection(rootNode
.getChildAt(0), "sortIndex");
148 Assert
.assertEquals(sortIndex
, new Integer(0));
149 String statement
= "Capitula without ligulate ray-florets; leaves entire or subentire";
150 Assert
.assertEquals(rootNode
.getChildAt(0).getStatement().getLabelText(Language
.ENGLISH()), statement
);
152 Assert
.assertEquals(rootNode
.getChildAt(1).getId(), 2753);
153 Assert
.assertEquals(rootNode
.getChildAt(1).getParent().getId(), rootNode
.getId());
154 Assert
.assertEquals(rootNode
.getChildAt(1).getKey().getId(), pKey
.getId());
155 sortIndex
= (Integer
)getFieldValueViaReflection(rootNode
.getChildAt(1), "sortIndex");
156 Assert
.assertEquals(sortIndex
, new Integer(1));
157 statement
= "Capitula with ligulate ray-florets; leaves pinnatisect";
158 Assert
.assertEquals(rootNode
.getChildAt(1).getStatement().getLabelText(Language
.ENGLISH()), statement
);
160 Assert
.assertEquals(rootNode
.getChildAt(1).getChildAt(0).getId(), 2754);
161 Assert
.assertEquals(rootNode
.getChildAt(1).getChildAt(0).getParent().getId(), rootNode
.getChildAt(1).getId());
162 Assert
.assertEquals(rootNode
.getChildAt(1).getChildAt(0).getKey().getId(), pKey
.getId());
163 sortIndex
= (Integer
)getFieldValueViaReflection(rootNode
.getChildAt(1).getChildAt(0), "sortIndex");
164 Assert
.assertEquals(sortIndex
, new Integer(0));
165 statement
= "Ray-florets yellow";
166 Assert
.assertEquals(rootNode
.getChildAt(1).getChildAt(0).getStatement().getLabelText(Language
.ENGLISH()), statement
);
167 Assert
.assertEquals(rootNode
.getChildAt(1).getChildAt(0).getChildAt(0).getTaxon().getTitleCache(), "Achillea arabica Kotschy sec. Cyprus");
171 public void addGrandChildPolytomousKeyNode() {
173 PolytomousKey pKey
= CdmBase
.deproxy(polytomousKeyService
.find(polytomousKeyUuid
),PolytomousKey
.class);
174 PolytomousKeyNode rootChildNode
= pKey
.getRoot().getChildAt(0);
175 PolytomousKeyNode grandChildNode
= PolytomousKeyNode
.NewInstance();
176 rootChildNode
.addChild(grandChildNode
);
178 polytomousKeyService
.merge(pKey
, true);
179 grandChildNode
= pKey
.getRoot().getChildAt(0).getChildAt(0);
180 Assert
.assertTrue(0 != grandChildNode
.getId());
181 KeyStatement ks
= KeyStatement
.NewInstance("test");
182 grandChildNode
.setStatement(ks
);
183 polytomousKeyService
.merge(pKey
, true);
185 //grandChildNode = pKey.getRoot().getChildAt(0).getChildAt(0);
186 //KeyStatement ks = grandChildNode.getStatement();
187 Assert
.assertTrue(0 != ks
.getId());
192 public void addGreatGrandChildPolytomousKeyNode() {
194 PolytomousKey pKey
= CdmBase
.deproxy(polytomousKeyService
.find(polytomousKeyUuid
),PolytomousKey
.class);
195 PolytomousKeyNode rootChildNode
= pKey
.getRoot().getChildAt(0);
196 PolytomousKeyNode grandChildNode
= PolytomousKeyNode
.NewInstance();
197 rootChildNode
.addChild(grandChildNode
);
200 polytomousKeyNodeService
.merge(grandChildNode
);
203 Assert
.assertFalse(pKey
.getRoot().getChildAt(0).getChildAt(0).getId() == 0);
207 public void savePolytomousKeyNodeData() {
208 PolytomousKey pkey
= CdmBase
.deproxy(polytomousKeyService
.find(polytomousKeyUuid
),PolytomousKey
.class);
210 PolytomousKeyNode pkeynode
= pkey
.getRoot();
211 String newQuestion
= "New Question";
212 String newStatement
= "New Statement";
214 Assert
.assertEquals("Question 1",pkeynode
.getQuestion().getLabel().get(Language
.ENGLISH()).getText());
215 for(PolytomousKeyNode node
: pkeynode
.getChildren()) {
217 node
.setQuestion(null);
218 node
.setStatement(null);
220 //FIXME:Remoting Add tests for feature after fixing problem
222 //Feature feature = pkeynode.getFeature();
223 //Assert.assertEquals(feature.getTitleCache(),"Systematics");
224 //pkeynode.setFeature(null);
226 Assert
.assertEquals(pkeynode
.getChildAt(0).getModifyingText().get(Language
.ENGLISH()).getText(),"Modifying Text 1a");
227 String modifyingText
= "Modifying Text 1a updated";
229 //pkeynode.getChildAt(0).putModifyingText(Language.ENGLISH(), modifyingText);
231 Assert
.assertEquals(pkeynode
.getChildAt(0).getSubkey().getId(),751);
232 Assert
.assertEquals("Asphodeline", pkeynode
.getChildAt(0).getSubkey().getTitleCache());
233 Assert
.assertNull(pkeynode
.getChildAt(1).getTaxon());
234 Taxon taxon
= CdmBase
.deproxy(taxonService
.find(taxon1Uuid
),Taxon
.class);
235 pkeynode
.getChildAt(1).setTaxon(taxon
);
237 polytomousKeyService
.merge(pkey
);
239 pkey
= CdmBase
.deproxy(polytomousKeyService
.find(polytomousKeyUuid
),PolytomousKey
.class);
242 pkeynode
= pkey
.getRoot();
243 for(PolytomousKeyNode node
: pkeynode
.getChildren()) {
244 Assert
.assertNull(node
.getQuestion());
245 node
.setQuestion(KeyStatement
.NewInstance(Language
.ENGLISH(),newQuestion
));
246 Assert
.assertNull(node
.getStatement());
247 node
.setStatement(KeyStatement
.NewInstance(Language
.ENGLISH(),newStatement
));
250 Assert
.assertEquals(pkeynode
.getChildAt(1).getTaxon(), taxon
);
252 polytomousKeyService
.merge(pkey
);
254 pkey
= CdmBase
.deproxy(polytomousKeyService
.find(polytomousKeyUuid
),PolytomousKey
.class);
256 pkeynode
= pkey
.getRoot();
257 for(PolytomousKeyNode node
: pkeynode
.getChildren()) {
258 Assert
.assertNotNull(node
.getQuestion());
259 Map
<Language
, LanguageString
> label
= node
.getQuestion().getLabel();
260 Assert
.assertEquals(newQuestion
, label
.get(Language
.ENGLISH()).getText());
261 Assert
.assertNotNull(node
.getStatement());
262 Assert
.assertEquals(newStatement
, node
.getStatement().getLabel(Language
.ENGLISH()).getText());
264 //Assert.assertEquals(pkeynode.getFeature().getId(), feature.getId());
270 public void savePolytomousKeyNodeDataWithSameSubKey() {
272 PolytomousKey pkey
= CdmBase
.deproxy(polytomousKeyService
.find(polytomousKeyUuid
),PolytomousKey
.class);
275 PolytomousKeyNode pkeynode
= pkey
.getRoot();
277 PolytomousKey subkey1
= CdmBase
.deproxy(pkeynode
.getChildAt(0).getSubkey(), PolytomousKey
.class);
278 String subkey1title
= subkey1
.getTitleCache();
279 subkey1
.setTitleCache(subkey1title
+ "test", true);
282 PolytomousKey subkey2
= CdmBase
.deproxy(pkeynode
.getChildAt(1).getChildAt(0).getSubkey(), PolytomousKey
.class);
283 String subkey2title
= subkey2
.getTitleCache();
284 subkey2
.setTitleCache(subkey2title
+ "test", true);
286 Assert
.assertSame(subkey1
, subkey2
);
288 polytomousKeyService
.merge(pkey
);
292 public void savePolytomousKeyNodeDataWithSameSubKeyUsingService() {
294 PolytomousKey pkey
= CdmBase
.deproxy(polytomousKeyService
.find(polytomousKeyUuid
),PolytomousKey
.class);
297 PolytomousKeyNode pkeynode
= pkey
.getRoot();
299 PersistentCollection children
= (PersistentCollection
) pkeynode
.getChildren();
300 PolytomousKeyNode childNode0
= (PolytomousKeyNode
)commonService
.get(pkeynode
.getUuid(), "children", 0);
301 PolytomousKey subkey1
= CdmBase
.deproxy(childNode0
.getSubkey(),PolytomousKey
.class);
302 String subkey1title
= subkey1
.getTitleCache();
303 subkey1
.setTitleCache(subkey1title
+ "test", true);
305 PolytomousKeyNode childNode1
= (PolytomousKeyNode
)commonService
.get(pkeynode
.getUuid(), "children", 1);
306 PolytomousKey subkey2
= CdmBase
.deproxy(childNode1
.getSubkey(),PolytomousKey
.class);
307 String subkey2title
= subkey2
.getTitleCache();
308 subkey2
.setTitleCache(subkey2title
+ "test", true);
310 Assert
.assertNotSame(childNode0
, childNode1
);
312 Assert
.assertSame(subkey1
, subkey2
);
314 polytomousKeyService
.merge(pkey
);
320 public void savePolytomousKeyNodeDataWithSameLanguageInLabel() {
322 PolytomousKey pkey
= CdmBase
.deproxy(polytomousKeyService
.find(polytomousKeyUuid
),PolytomousKey
.class);
323 PolytomousKeyNode pkeynode
= pkey
.getRoot();
325 Map
<Language
, LanguageString
> label1
= pkeynode
.getQuestion().getLabel();
329 Map
<Language
, LanguageString
> label2
= pkeynode
.getChildAt(0).getStatement().getLabel();
333 polytomousKeyService
.merge(pkey
);
337 public void deleteSubKeyInPolytomousSubKeyWithoutInitializing() {
338 PolytomousKey pKey
= CdmBase
.deproxy(polytomousKeyService
.find(polytomousKeyUuid
),PolytomousKey
.class);
341 PolytomousKeyNode rootNode
= pKey
.getRoot();
342 PolytomousKeyNode child
= rootNode
.getChildAt(0);
343 PolytomousKey subKey
= child
.getSubkey();
345 polytomousKeyService
.delete(subKey
.getUuid());
347 // retrieving subkey shows its null
348 subKey
= CdmBase
.deproxy(polytomousKeyService
.find(subKeyUuid
),PolytomousKey
.class);
349 Assert
.assertNull(subKey
);
351 pKey
= CdmBase
.deproxy(polytomousKeyService
.find(polytomousKeyUuid
),PolytomousKey
.class);
354 rootNode
= pKey
.getRoot();
355 child
= rootNode
.getChildAt(0);
356 subKey
= child
.getSubkey();
357 // subkey will not be null, because the delete functionality of the subkey
358 // does not currently delete it from a polytomous key node
360 // FIXME: With the new delete functionality this should be null, shouldn't it ?
361 Assert
.assertNotNull(subKey
);
366 public void deleteSubKeyInPolytomousNode() {
367 PolytomousKey pKey
= CdmBase
.deproxy(polytomousKeyService
.find(polytomousKeyUuid
),PolytomousKey
.class);
370 PolytomousKeyNode rootNode
= pKey
.getRoot();
371 List
<PolytomousKeyNode
> children
= rootNode
.getChildren();
372 PolytomousKeyNode child
= rootNode
.getChildAt(0);
373 polytomousKeyNodeService
.delete(child
.getUuid(), true);
375 pKey
= CdmBase
.deproxy(polytomousKeyService
.find(polytomousKeyUuid
),PolytomousKey
.class);
377 rootNode
= pKey
.getRoot();
378 children
= rootNode
.getChildren();
379 Assert
.assertFalse(children
.contains(child
));
383 public void deleteSubKeyInPolytomousSubKeyAfterInitializing() {
384 PolytomousKey pKey
= CdmBase
.deproxy(polytomousKeyService
.find(polytomousKeyUuid
),PolytomousKey
.class);
387 PolytomousKeyNode rootNode
= pKey
.getRoot();
388 PolytomousKeyNode child
= rootNode
.getChildAt(0);
389 PolytomousKey subKey
= child
.getSubkey();
390 // this call initializes the subkey
393 polytomousKeyService
.delete(subKey
);
395 // since subKey was initialized before the delete, it will be
396 // accesible even after the delete. This behaviour is similar
397 // to hibernate session delete where the deleted object is
398 // made transient, but not deleted from the object graph
400 PolytomousKeyNode subKeyRootNode
= subKey
.getRoot();
401 Assert
.assertNotNull(subKey
);
405 public void saveNewTermVocabulary() {
406 TermVocabulary termVocabulary
=
407 TermVocabulary
.NewInstance(TermType
.Feature
,
413 List
<TermVocabulary
<DefinedTermBase
>> vocabularies
= vocabularyService
.findByTermType(TermType
.Feature
);
415 for(TermVocabulary vocab
: vocabularies
) {
416 vocab
.getTermsOrderedByLabels(Language
.ENGLISH());
419 termVocabulary
= vocabularyService
.merge(termVocabulary
);
420 vocabularies
.add(termVocabulary
);
421 termVocabulary
.setLabel("Test");
422 vocabularyService
.merge(new ArrayList
<TermVocabulary
>(vocabularies
));
424 vocabularyService
.delete(termVocabulary
);
429 public void saveNewTerm() {
430 UUID vocNameFeatureUuid
= UUID
.fromString("fa7ca3eef-4092-49e1-beec-ed5096193e5e");
431 UUID vocFeatureUuid
= UUID
.fromString("b187d555-f06f-4d65-9e53-da7c93f8eaa8");
432 DefinedTermBase newTerm
= TermType
.Feature
.getEmptyDefinedTermBase();
433 newTerm
.setLabel("CreateTest");
437 Assert
.assertNotNull(newTerm
);
438 TermVocabulary vocNameFeature
= vocabularyService
.find(vocNameFeatureUuid
);
439 TermVocabulary vocFeature
= vocabularyService
.find(vocFeatureUuid
);
441 List
<TermVocabulary
> vocs
= new ArrayList
<TermVocabulary
>();
443 vocs
.add(vocNameFeature
);
444 vocs
.add(vocFeature
);
446 vocNameFeature
.addTerm(newTerm
);
448 vocs
= vocabularyService
.merge(vocs
);
449 for(TermVocabulary voc
: vocs
) {
450 if(voc
.getUuid().equals(vocNameFeatureUuid
)) {
451 vocNameFeature
= voc
;
455 Assert
.assertTrue(vocNameFeature
.getTerms().contains(newTerm
));
457 for(Object obj
: vocNameFeature
.getTerms()) {
458 DefinedTermBase dtb
= (DefinedTermBase
)obj
;
459 if("CreateTest".equals(dtb
.getLabel())) {
461 Assert
.assertNotNull(dtb
.getCreatedBy());
462 Assert
.assertNotNull(dtb
.getCreated());
464 Assert
.assertNull(dtb
.getCreatedBy());
467 newTerm
.setLabel("UpdateTest");
468 newTerm
= termService
.merge(newTerm
);
469 Assert
.assertNotNull(newTerm
.getUpdatedBy());
470 Assert
.assertNotNull(newTerm
.getUpdated());
472 Assert
.assertNull(vocNameFeature
.getCreatedBy());
473 Assert
.assertNull(vocFeature
.getCreatedBy());
475 if(termService
.find(newTerm
.getUuid()) != null) {
476 termService
.delete(newTerm
.getUuid());
483 public void updatePerson() {
485 Person person
= (Person
) CdmApplicationState
.getCurrentAppConfig().getAgentService().load(personUuid
);
486 person
.setFirstname("Me");
487 CdmApplicationState
.getCurrentAppConfig().getAgentService().merge(person
);
492 public void createPerson() {
494 Person person
= Person
.NewInstance();
495 person
= (Person
) CdmApplicationState
.getCurrentAppConfig().getAgentService().merge(person
);
496 person
= (Person
) CdmApplicationState
.getCurrentAppConfig().getAgentService().load(person
.getUuid());
497 person
.setFirstname("Some");
498 CdmApplicationState
.getCurrentAppConfig().getAgentService().merge(person
);
502 public void testThreadLocalActiveSession() throws InterruptedException
{
503 MockSessionOwner
<CdmBase
> so1
= new MockSessionOwner
<CdmBase
>();
504 final ICdmEntitySession activeSession
= getCdmEntitySessionManager().newSession(so1
, true);
505 TestThread thread
= new TestThread(true) {
507 public void doRun() throws InterruptedException
{
508 ICdmEntitySession threadLocalActiveSession
= getCdmEntitySessionManager().getActiveSession();
509 Assert
.assertEquals(threadLocalActiveSession
, activeSession
);
512 invokeThread(thread
);
513 MockSessionOwner
<CdmBase
> so2
= new MockSessionOwner
<CdmBase
>();
514 ICdmEntitySession newActiveSession
= getCdmEntitySessionManager().newSession(so2
, true);
515 Assert
.assertFalse(activeSession
.equals(newActiveSession
));