use of org.molgenis.beacon.controller.model.BeaconAlleleRequest in project molgenis by molgenis.
the class BeaconControllerTest method testPostQuery.
@Test
public void testPostQuery() throws Exception {
BeaconAlleleRequest request = BeaconAlleleRequest.create("1", 100L, "A", "T");
BeaconAlleleResponse response = BeaconAlleleResponse.create("beaconA", true, null, request);
when(beaconQueryService.query("beaconA", request)).thenReturn(response);
mockMvc.perform(post("/beacon/{beaconId}/query", "beaconA").content(getBeaconAlleleRequestJson()).contentType(APPLICATION_JSON)).andExpect(status().isOk()).andExpect(content().contentType(APPLICATION_JSON_UTF8)).andExpect(content().string(getBeaconAlleleResponseAsJson()));
verify(beaconQueryService, times(1)).query("beaconA", request);
}
Aggregations