]> git.aero2k.de Git - tmp/jakarta-migration.git/blob
8ff593eddd167b2908556662a7bfd69e9918cfc6
[tmp/jakarta-migration.git] /
1 /**
2  * This document is a part of the source code and related artifacts
3  * for CollectionSpace, an open source collections management system
4  * for museums and related institutions:
5  *
6  * http://www.collectionspace.org
7  * http://wiki.collectionspace.org
8  *
9  * Copyright (c) 2009 Regents of the University of California
10  *
11  * Licensed under the Educational Community License (ECL), Version 2.0.
12  * You may not use this file except in compliance with this License.
13  *
14  * You may obtain a copy of the ECL 2.0 License at
15  * https://source.collectionspace.org/collection-space/LICENSE.txt
16  *
17  * Unless required by applicable law or agreed to in writing, software
18  * distributed under the License is distributed on an "AS IS" BASIS,
19  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20  * See the License for the specific language governing permissions and
21  * limitations under the License.
22  */
23 package org.collectionspace.services.client.test;
24
25 import java.util.ArrayList;
26 import java.util.List;
27 import javax.ws.rs.core.MediaType;
28 import javax.ws.rs.core.Response;
29
30 import org.collectionspace.services.client.AcquisitionClient;
31
32 import org.collectionspace.services.acquisition.AcquisitionsCommon;
33 import org.collectionspace.services.acquisition.AcquisitionsCommonList;
34 import org.collectionspace.services.acquisition.AcquisitionSourceList;
35 import org.jboss.resteasy.client.ClientResponse;
36
37 import org.jboss.resteasy.plugins.providers.multipart.MultipartInput;
38 import org.jboss.resteasy.plugins.providers.multipart.MultipartOutput;
39 import org.jboss.resteasy.plugins.providers.multipart.OutputPart;
40 import org.testng.Assert;
41 import org.testng.annotations.AfterClass;
42 import org.testng.annotations.Test;
43
44 import org.slf4j.Logger;
45 import org.slf4j.LoggerFactory;
46
47 /**
48  * AcquisitionServiceTest, carries out tests against a
49  * deployed and running Acquisition Service.
50  * 
51  * $LastChangedRevision: 621 $
52  * $LastChangedDate: 2009-09-02 16:49:01 -0700 (Wed, 02 Sep 2009) $
53  */
54 public class AcquisitionServiceTest extends AbstractServiceTestImpl {
55
56     private final Logger logger =
57         LoggerFactory.getLogger(AcquisitionServiceTest.class);
58
59     // Instance variables specific to this test.
60     private AcquisitionClient client = new AcquisitionClient();
61     private String knownResourceId = null;
62     private List<String> allResourceIdsCreated = new ArrayList();
63
64     // ---------------------------------------------------------------
65     // CRUD tests : CREATE tests
66     // ---------------------------------------------------------------
67     // Success outcomes
68     @Override
69     @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class)
70     public void create(String testName) throws Exception {
71
72         // Perform setup, such as initializing the type of service request
73         // (e.g. CREATE, DELETE), its valid and expected status codes, and
74         // its associated HTTP method name (e.g. POST, DELETE).
75         setupCreate(testName);
76
77         // Submit the request to the service and store the response.
78         String identifier = createIdentifier();
79
80         MultipartOutput multipart = createAcquisitionInstance(identifier);
81         ClientResponse<Response> res = client.create(multipart);
82
83         int statusCode = res.getStatus();
84
85         // Check the status code of the response: does it match
86         // the expected response(s)?
87         //
88         // Specifically:
89         // Does it fall within the set of valid status codes?
90         // Does it exactly match the expected status code?
91         if(logger.isDebugEnabled()){
92             logger.debug(testName + ": status = " + statusCode);
93         }
94         Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
95                 invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
96         Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
97
98         // Store the ID returned from the first resource created
99         // for additional tests below.
100         if (knownResourceId == null){
101             knownResourceId = extractId(res);
102             if (logger.isDebugEnabled()) {
103                 logger.debug(testName + ": knownResourceId=" + knownResourceId);
104             }
105         }
106         
107         // Store the IDs from every resource created by tests,
108         // so they can be deleted after tests have been run.
109         allResourceIdsCreated.add(extractId(res));
110     }
111
112     @Override
113     @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
114        dependsOnMethods = {"create"})
115     public void createList(String testName) throws Exception {
116         for(int i = 0; i < 3; i++){
117             create(testName);
118         }
119     }
120
121     // Failure outcomes
122     // Placeholders until the three tests below can be uncommented.
123     // See Issue CSPACE-401.
124     @Override
125     public void createWithEmptyEntityBody(String testName) throws Exception {
126     }
127
128     @Override
129     public void createWithMalformedXml(String testName) throws Exception {
130     }
131
132     @Override
133     public void createWithWrongXmlSchema(String testName) throws Exception {
134     }
135
136     /*
137     @Override
138     @Test(dataProvider="testName", dataProviderClass=AbstractServiceTest.class,
139         dependsOnMethods = {"create", "testSubmitRequest"})
140     public void createWithMalformedXml(String testName) throws Exception {
141     
142     // Perform setup.
143     setupCreateWithMalformedXml();
144
145     // Submit the request to the service and store the response.
146     String method = REQUEST_TYPE.httpMethodName();
147     String url = getServiceRootURL();
148     final String entity = MALFORMED_XML_DATA; // Constant from base class.
149     int statusCode = submitRequest(method, url, entity);
150
151     // Check the status code of the response: does it match
152     // the expected response(s)?
153     if(logger.isDebugEnabled()){
154         logger.debug(testName + ": url=" + url +
155             " status=" + statusCode);
156      }
157     Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
158     invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
159     Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
160     }
161
162     @Override
163     @Test(dataProvider="testName", dataProviderClass=AbstractServiceTest.class,
164         dependsOnMethods = {"create", "testSubmitRequest"})
165     public void createWithWrongXmlSchema() throws Exception {
166     
167     // Perform setup.
168     setupCreateWithWrongXmlSchema();
169
170     // Submit the request to the service and store the response.
171     String method = REQUEST_TYPE.httpMethodName();
172     String url = getServiceRootURL();
173     final String entity = WRONG_XML_SCHEMA_DATA;
174     int statusCode = submitRequest(method, url, entity);
175
176     // Check the status code of the response: does it match
177     // the expected response(s)?
178     if(logger.isDebugEnabled()){
179         logger.debug(testName + ": url=" + url +
180             " status=" + statusCode);
181      }
182     Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
183     invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
184     Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
185     }
186      */
187
188     // ---------------------------------------------------------------
189     // CRUD tests : READ tests
190     // ---------------------------------------------------------------
191     // Success outcomes
192     @Override
193     @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
194         dependsOnMethods = {"create"})
195     public void read(String testName) throws Exception {
196
197         // Perform setup.
198         setupRead(testName);
199
200         // Submit the request to the service and store the response.
201         ClientResponse<MultipartInput> res = client.read(knownResourceId);
202         int statusCode = res.getStatus();
203
204         // Check the status code of the response: does it match
205         // the expected response(s)?
206         if(logger.isDebugEnabled()){
207             logger.debug(testName + ": status = " + statusCode);
208         }
209         Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
210                 invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
211         Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
212
213         MultipartInput input = (MultipartInput) res.getEntity();
214         AcquisitionsCommon acquisitionObject = (AcquisitionsCommon) extractPart(input,
215                 client.getCommonPartName(), AcquisitionsCommon.class);
216         Assert.assertNotNull(acquisitionObject);
217
218     }
219
220     // Failure outcomes
221     @Override
222     @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
223         dependsOnMethods = {"read"})
224     public void readNonExistent(String testName) throws Exception {
225
226         // Perform setup.
227         setupReadNonExistent(testName);
228
229         // Submit the request to the service and store the response.
230         ClientResponse<MultipartInput> res = client.read(NON_EXISTENT_ID);
231         int statusCode = res.getStatus();
232
233         // Check the status code of the response: does it match
234         // the expected response(s)?
235         if(logger.isDebugEnabled()){
236             logger.debug(testName + ": status = " + statusCode);
237         }
238         Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
239                 invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
240         Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
241     }
242
243     // ---------------------------------------------------------------
244     // CRUD tests : READ_LIST tests
245     // ---------------------------------------------------------------
246     // Success outcomes
247     @Override
248     @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
249         dependsOnMethods = {"createList", "read"})
250     public void readList(String testName) throws Exception {
251
252         // Perform setup.
253         setupReadList(testName);
254
255         // Submit the request to the service and store the response.
256         ClientResponse<AcquisitionsCommonList> res = client.readList();
257         AcquisitionsCommonList list = res.getEntity();
258         int statusCode = res.getStatus();
259
260         // Check the status code of the response: does it match
261         // the expected response(s)?
262         if(logger.isDebugEnabled()){
263             logger.debug(testName + ": status = " + statusCode);
264         }
265         Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
266                 invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
267         Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
268
269         // Optionally output additional data about list members for debugging.
270         boolean iterateThroughList = false;
271         if(iterateThroughList && logger.isDebugEnabled()){
272             List<AcquisitionsCommonList.AcquisitionListItem> items =
273                     list.getAcquisitionListItem();
274             int i = 0;
275             for(AcquisitionsCommonList.AcquisitionListItem item : items){
276                 logger.debug(testName + ": list-item[" + i + "] csid=" +
277                         item.getCsid());
278                 logger.debug(testName + ": list-item[" + i + "] objectNumber=" +
279                         item.getAcquisitionReferenceNumber());
280                 logger.debug(testName + ": list-item[" + i + "] URI=" +
281                         item.getUri());
282                 i++;
283             }
284         }
285
286     }
287
288     // Failure outcomes
289     // None at present.
290
291     // ---------------------------------------------------------------
292     // CRUD tests : UPDATE tests
293     // ---------------------------------------------------------------
294
295     // Success outcomes
296     @Override
297     @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
298         dependsOnMethods = {"read"})
299     public void update(String testName) throws Exception {
300
301         // Perform setup.
302         setupUpdate(testName);
303
304         ClientResponse<MultipartInput> res =
305                 client.read(knownResourceId);
306         if(logger.isDebugEnabled()){
307             logger.debug(testName + ": read status = " + res.getStatus());
308         }
309         Assert.assertEquals(res.getStatus(), EXPECTED_STATUS_CODE);
310
311         if(logger.isDebugEnabled()){
312             logger.debug("got object to update with ID: " + knownResourceId);
313         }
314         MultipartInput input = (MultipartInput) res.getEntity();
315         AcquisitionsCommon acquisition = (AcquisitionsCommon) extractPart(input,
316                 client.getCommonPartName(), AcquisitionsCommon.class);
317         Assert.assertNotNull(acquisition);
318
319         // Update the content of this resource.
320         acquisition.setAcquisitionReferenceNumber("updated-" + acquisition.getAcquisitionReferenceNumber());
321         if(logger.isDebugEnabled()){
322             logger.debug("updated object");
323             logger.debug(objectAsXmlString(acquisition, AcquisitionsCommon.class));
324         }
325         // Submit the request to the service and store the response.
326         MultipartOutput output = new MultipartOutput();
327         OutputPart commonPart = output.addPart(acquisition, MediaType.APPLICATION_XML_TYPE);
328         commonPart.getHeaders().add("label", client.getCommonPartName());
329
330         res = client.update(knownResourceId, output);
331         int statusCode = res.getStatus();
332         // Check the status code of the response: does it match the expected response(s)?
333         if(logger.isDebugEnabled()){
334             logger.debug(testName + ": status = " + statusCode);
335         }
336         Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
337                 invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
338         Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
339
340
341         input = (MultipartInput) res.getEntity();
342         AcquisitionsCommon updatedAcquisition =
343                 (AcquisitionsCommon) extractPart(input,
344                         client.getCommonPartName(), AcquisitionsCommon.class);
345         Assert.assertNotNull(updatedAcquisition);
346
347         Assert.assertEquals(updatedAcquisition.getAcquisitionReferenceNumber(),
348                 acquisition.getAcquisitionReferenceNumber(),
349                 "Data in updated object did not match submitted data.");
350
351     }
352
353     // Failure outcomes
354     // Placeholders until the three tests below can be uncommented.
355     // See Issue CSPACE-401.
356     @Override
357     public void updateWithEmptyEntityBody(String testName) throws Exception {
358     }
359
360     @Override
361     public void updateWithMalformedXml(String testName) throws Exception {
362     }
363
364     @Override
365     public void updateWithWrongXmlSchema(String testName) throws Exception {
366     }
367
368     /*
369     @Override
370     @Test(dataProvider="testName", dataProviderClass=AbstractServiceTest.class,
371         dependsOnMethods = {"create", "update", "testSubmitRequest"})
372     public void updateWithEmptyEntityBody(String testName) throws Exception {
373     
374     // Perform setup.
375     setupUpdateWithEmptyEntityBody(testName);
376
377     // Submit the request to the service and store the response.
378     String method = REQUEST_TYPE.httpMethodName();
379     String url = getResourceURL(knownResourceId);
380     String mediaType = MediaType.APPLICATION_XML;
381     final String entity = "";
382     int statusCode = submitRequest(method, url, mediaType, entity);
383
384     // Check the status code of the response: does it match
385     // the expected response(s)?
386     if(logger.isDebugEnabled()){
387         (testName + ": url=" + url + " status=" + statusCode);
388     }
389     Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
390     invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
391     Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
392     }
393
394     @Override
395     @Test(dataProvider="testName", dataProviderClass=AbstractServiceTest.class,
396         dependsOnMethods = {"create", "testSubmitRequest"})
397     public void createWithEmptyEntityBody() throws Exception {
398     
399     // Perform setup.
400     setupCreateWithEmptyEntityBody(testName);
401
402     // Submit the request to the service and store the response.
403     String method = REQUEST_TYPE.httpMethodName();
404     String url = getServiceRootURL();
405     String mediaType = MediaType.APPLICATION_XML;
406     final String entity = "";
407     int statusCode = submitRequest(method, url, mediaType, entity);
408
409     // Check the status code of the response: does it match
410     // the expected response(s)?
411     if(logger.isDebugEnabled()){
412         logger.debug(testName + ": url=" + url +
413             " status=" + statusCode);
414     }
415     Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
416     invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
417     Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
418     }
419
420     @Override
421     @Test(dataProvider="testName", dataProviderClass=AbstractServiceTest.class,
422         dependsOnMethods = {"create", "update", "testSubmitRequest"})
423     public void updateWithMalformedXml(String testName) throws Exception {
424
425     // Perform setup.
426     setupUpdateWithMalformedXml(testName);
427
428     // Submit the request to the service and store the response.
429     String method = REQUEST_TYPE.httpMethodName();
430     String url = getResourceURL(knownResourceId);
431     final String entity = MALFORMED_XML_DATA;
432     int statusCode = submitRequest(method, url, entity);
433
434     // Check the status code of the response: does it match
435     // the expected response(s)?
436     if(logger.isDebugEnabled()){
437         logger.debug(testName + ": url=" + url +
438             " status=" + statusCode);
439      }
440     Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
441     invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
442     Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
443     }
444
445     @Override
446     @Test(dependsOnMethods = {"create", "update", "testSubmitRequest"})
447     public void updateWithWrongXmlSchema(String testName) {
448     
449     // Perform setup.
450     setupUpdateWithWrongXmlSchema(testName);
451
452     // Submit the request to the service and store the response.
453     String method = REQUEST_TYPE.httpMethodName();
454     String url = getResourceURL(knownResourceId);
455     final String entity = WRONG_XML_SCHEMA_DATA;
456     int statusCode = submitRequest(method, url, entity);
457
458     // Check the status code of the response: does it match
459     // the expected response(s)?
460     if(logger.isDebugEnabled()){
461         logger.debug(testName + ": url=" + url +
462             " status=" + statusCode);
463      }
464     Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
465     invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
466     Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
467     }
468      */
469     
470     @Override
471     @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
472         dependsOnMethods = {"update", "testSubmitRequest"})
473     public void updateNonExistent(String testName) throws Exception {
474
475         // Perform setup.
476         setupUpdateNonExistent(testName);
477
478         // Submit the request to the service and store the response.
479         // Note: The ID used in this 'create' call may be arbitrary.
480         // The only relevant ID may be the one used in update(), below.
481         MultipartOutput multipart = createAcquisitionInstance(NON_EXISTENT_ID);
482         ClientResponse<MultipartInput> res =
483                 client.update(NON_EXISTENT_ID, multipart);
484         int statusCode = res.getStatus();
485
486         // Check the status code of the response: does it match
487         // the expected response(s)?
488         if(logger.isDebugEnabled()){
489             logger.debug(testName + ": status = " + statusCode);
490         }
491         Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
492                 invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
493         Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
494     }
495
496     // ---------------------------------------------------------------
497     // CRUD tests : DELETE tests
498     // ---------------------------------------------------------------
499     // Success outcomes
500     @Override
501     @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
502         dependsOnMethods = {"create", "read", "update"})
503     public void delete(String testName) throws Exception {
504
505         // Perform setup.
506         setupDelete(testName);
507
508         // Submit the request to the service and store the response.
509         ClientResponse<Response> res = client.delete(knownResourceId);
510         int statusCode = res.getStatus();
511
512         // Check the status code of the response: does it match
513         // the expected response(s)?
514         if(logger.isDebugEnabled()){
515             logger.debug(testName + ": status = " + statusCode);
516         }
517         Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
518                 invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
519         Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
520     }
521
522     // Failure outcomes
523     @Override
524     @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
525         dependsOnMethods = {"delete"})
526     public void deleteNonExistent(String testName) throws Exception {
527
528         // Perform setup.
529         setupDeleteNonExistent(testName);
530
531         // Submit the request to the service and store the response.
532         ClientResponse<Response> res = client.delete(NON_EXISTENT_ID);
533         int statusCode = res.getStatus();
534
535         // Check the status code of the response: does it match
536         // the expected response(s)?
537         if(logger.isDebugEnabled()){
538             logger.debug(testName + ": status = " + statusCode);
539         }
540         Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
541                 invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
542         Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
543     }
544
545     // ---------------------------------------------------------------
546     // Utility tests : tests of code used in tests above
547     // ---------------------------------------------------------------
548     /**
549      * Tests the code for manually submitting data that is used by several
550      * of the methods above.
551      */
552     @Test(dependsOnMethods = {"create", "read"})
553     public void testSubmitRequest() throws Exception {
554
555         // Expected status code: 200 OK
556         final int EXPECTED_STATUS = Response.Status.OK.getStatusCode();
557
558         // Submit the request to the service and store the response.
559         String method = ServiceRequestType.READ.httpMethodName();
560         String url = getResourceURL(knownResourceId);
561         int statusCode = submitRequest(method, url);
562
563         // Check the status code of the response: does it match
564         // the expected response(s)?
565         if(logger.isDebugEnabled()){
566             logger.debug("testSubmitRequest: url=" + url +
567                 " status=" + statusCode);
568         }
569         Assert.assertEquals(statusCode, EXPECTED_STATUS);
570
571     }
572
573     // ---------------------------------------------------------------
574     // Cleanup of resources created during testing
575     // ---------------------------------------------------------------
576
577     /**
578      * Deletes all resources created by tests, after all tests have been run.
579      *
580      * This cleanup method will always be run, even if one or more tests fail.
581      * For this reason, it attempts to remove all resources created
582      * at any point during testing, even if some of those resources
583      * may be expected to be deleted by certain tests.
584      */
585     @AfterClass(alwaysRun=true)
586     public void cleanUp() {
587         if (logger.isDebugEnabled()) {
588             logger.debug("Cleaning up temporary resources created for testing ...");
589         }
590         for (String resourceId : allResourceIdsCreated) {
591             // Note: Any non-success responses are ignored and not reported.
592             ClientResponse<Response> res = client.delete(resourceId);
593         }
594     }
595
596     // ---------------------------------------------------------------
597     // Utility methods used by tests above
598     // ---------------------------------------------------------------
599     @Override
600     public String getServicePathComponent() {
601         return client.getServicePathComponent();
602     }
603
604
605     private MultipartOutput createAcquisitionInstance(String identifier) {
606         AcquisitionsCommon acquisition = new AcquisitionsCommon();
607         acquisition.setAcquisitionReferenceNumber("acquisitionReferenceNumber-"  + identifier);
608         AcquisitionSourceList acqSourcesList = new AcquisitionSourceList();
609         List<String> sources = acqSourcesList.getAcquisitionSource();
610         // @TODO Use properly formatted refNames for representative acquisition
611         // sources in this example test record. The following are mere placeholders.
612         sources.add("Donor Acquisition Source " + identifier);
613         sources.add("Museum Acquisition Source" + identifier);
614         MultipartOutput multipart = new MultipartOutput();
615         OutputPart commonPart = multipart.addPart(acquisition,
616             MediaType.APPLICATION_XML_TYPE);
617         commonPart.getHeaders().add("label", client.getCommonPartName());
618
619         if(logger.isDebugEnabled()){
620             logger.debug("to be created, acquisition common");
621             logger.debug(objectAsXmlString(acquisition, AcquisitionsCommon.class));
622         }
623         return multipart;
624     }
625 }