Example usage for org.springframework.http HttpStatus INSUFFICIENT_STORAGE

List of usage examples for org.springframework.http HttpStatus INSUFFICIENT_STORAGE

Introduction

In this page you can find the example usage for org.springframework.http HttpStatus INSUFFICIENT_STORAGE.

Prototype

HttpStatus INSUFFICIENT_STORAGE

To view the source code for org.springframework.http HttpStatus INSUFFICIENT_STORAGE.

Click Source Link

Document

507 Insufficient Storage

Usage

From source file:software.coolstuff.springframework.owncloud.service.impl.rest.OwncloudRestResourceServiceTest.java

@Override
protected void prepare_getOutputStram_NOK_FileTooBig(URI href, MediaType mediaType, String testFileContent)
        throws Exception {
    Mockito.when(sardine.list(getResourcePath(href), 0))
            .thenThrow(new SardineException("No File", HttpStatus.NOT_FOUND.value(), null));
    mockServer.expect(requestToWithPrefix(href)).andExpect(method(HttpMethod.PUT))
            .andExpect(header(HttpHeaders.AUTHORIZATION, getBasicAuthorizationHeader()))
            .andExpect(header(HttpHeaders.CONNECTION, "keep-alive")).andExpect(content().contentType(mediaType))
            .andExpect(content().string(testFileContent))
            .andRespond(withStatus(HttpStatus.INSUFFICIENT_STORAGE));
}