5050
5151import static com .powsybl .caseserver .Utils .ZIP_EXTENSION ;
5252import static com .powsybl .caseserver .service .CaseService .DELIMITER ;
53- import static org .hamcrest .Matchers .hasSize ;
54- import static org .hamcrest .Matchers .startsWith ;
53+ import static org .hamcrest .Matchers .*;
5554import static org .junit .Assert .assertEquals ;
5655import static org .junit .jupiter .api .Assertions .*;
5756import static org .springframework .test .web .servlet .request .MockMvcRequestBuilders .*;
58- import static org .springframework .test .web .servlet .result .MockMvcResultMatchers .content ;
59- import static org .springframework .test .web .servlet .result .MockMvcResultMatchers .status ;
57+ import static org .springframework .test .web .servlet .result .MockMvcResultMatchers .*;
6058
6159/**
6260 * @author Abdelsalem Hedhili <abdelsalem.hedhili at rte-france.com>
@@ -272,6 +270,7 @@ void test() throws Exception {
272270 byte [] expectedGzippedBytes = byteArrayOutputStream .toByteArray ();
273271 mvc .perform (get (GET_CASE_URL , firstCaseUuid ))
274272 .andExpect (status ().isOk ())
273+ .andExpect (header ().string ("Content-Disposition" , "attachment; filename=\" " + TEST_CASE + "\" " ))
275274 .andExpect (content ().bytes (expectedGzippedBytes ))
276275 .andReturn ();
277276 }
@@ -280,6 +279,7 @@ void test() throws Exception {
280279 mvc .perform (get (GET_CASE_URL , gzipCaseUuid ))
281280 .andExpect (status ().isOk ())
282281 .andExpect (content ().bytes (getClass ().getResourceAsStream ("/" + TEST_GZIP_CASE ).readAllBytes ()))
282+ .andExpect (header ().string ("Content-Disposition" , "attachment; filename=\" " + TEST_GZIP_CASE + "\" " ))
283283 .andReturn ();
284284 assertNotNull (outputDestination .receive (1000 , caseImportDestination ));
285285
0 commit comments