MetaDataResourceImpl implements MetaDataResource { @Override @GET @ValidationRequired(processor = RestViolationProcessor.class) @ApiOperation(value = "Get metadata of map", httpMethod="GET", response=MetaDataDTO.class) @ApiResponses(value = { @ApiResponse(code = 200, message = "Metadata of map was found", response=MetaDataDTO.class), @ApiResponse(code = 400, message = "Invalid input parameter (header)"), @ApiResponse(code = 400, message = "Metadata of map was not found")}) public Response getMetaData(@Auth BasicAuth principal, @ApiParam(value = "Application identifier", required = true) @NotBlank @NotNull @HeaderParam("api_key") String appIdentifier) throws AssemblyException, MetaDataNotExistsException { validations.checkIsNotNullAndNotBlank(appIdentifier); MetaData metaData = metaDataManagerImpl.getMetaData(appIdentifier); MetaDataDTO metaDataDTO=metaDataAssemblerImpl.createDataTransferObject(metaData); return Response.ok(metaDataDTO).build(); }  @Override @GET @ValidationRequired(processor = RestViolationProcessor.class) @ApiOperation(value = "Get metadata of map", httpMethod="GET", response=MetaDataDTO.class) @ApiResponses(value = { @ApiResponse(code = 200, message = "Metadata of map was found", response=MetaDataDTO.class), @ApiResponse(code = 400, message = "Invalid input parameter (header)"), @ApiResponse(code = 400, message = "Metadata of map was not found")}) Response getMetaData(@Auth BasicAuth principal,
			@ApiParam(value = "Application identifier", required = true) @NotBlank @NotNull @HeaderParam("api_key") String appIdentifier);  }
@Test public void getMetaData() throws Exception{ String appIdentifier = "1"; Mockito.when(metaDataManagerImpl.getMetaData(appIdentifier)).thenReturn(metaData); Mockito.when(metaDataAssemblerImpl.createDataTransferObject(metaData)).thenReturn(metaDataDTO); Response response = metaDataResourceImpl.getMetaData(principal, appIdentifier); Mockito.verify(validations).checkIsNotNullAndNotBlank(appIdentifier); assertNotNull(response.getEntity()); assertEquals("FeatureDTO is not the expected", metaDataDTO, (MetaDataDTO) response.getEntity()); assertEquals("The Status response is not the expected", 200, response.getStatus()); }