MapFileResourceImpl implements MapFileResource { @Override @GET @ValidationRequired(processor = RestViolationProcessor.class) @ApiOperation(value = "Get .map file", httpMethod="GET", response=InputStream.class) @ApiResponses(value = { @ApiResponse(code = 200, message = ".map file was found", response=InputStream.class), @ApiResponse(code = 400, message = "Invalid input parameter (header)"), @ApiResponse(code = 404, message = ".map file was not found")}) public Response getMapFile(@Auth BasicAuth principal, @ApiParam(value = "Application identifier", required = true) @NotBlank @NotNull @HeaderParam("api_key") String appIdentifier) throws MapFileNotExistsException{ validations.checkIsNotNullAndNotBlank(appIdentifier); InputStream mapFile=mapFileManager.getMapFile(appIdentifier); return Response.ok(mapFile).build(); }  @Override @GET @ValidationRequired(processor = RestViolationProcessor.class) @ApiOperation(value = "Get .map file", httpMethod="GET", response=InputStream.class) @ApiResponses(value = { @ApiResponse(code = 200, message = ".map file was found", response=InputStream.class), @ApiResponse(code = 400, message = "Invalid input parameter (header)"), @ApiResponse(code = 404, message = ".map file was not found")}) Response getMapFile(@Auth BasicAuth principal,
		  @ApiParam(value = "Application identifier", required = true) @NotBlank @NotNull @HeaderParam("api_key") String appIdentifier);  }
@Test public void getFileMap() throws MapFileNotExistsException{ String appIdentifier = "1"; Mockito.when(mapFileManagerImpl.getMapFile(appIdentifier)).thenReturn(inputStream); Response response=mapFileResourceImpl.getMapFile(principal, appIdentifier) ; Mockito.verify(validations).checkIsNotNullAndNotBlank(appIdentifier); Mockito.verify(mapFileManagerImpl).getMapFile(appIdentifier); assertNotNull(response.getEntity()); assertEquals("The object response is not the expected", inputStream, (InputStream) response.getEntity()); assertEquals("The Status response is not the expected", 200, response.getStatus()); }