Assert.assertEquals(MockProvider.EXAMPLE_HISTORIC_FORM_FIELD_VALUE, returnedFieldValue);
}
@Test
public void testSerializableVariableInstanceRetrieval() {
ObjectValue serializedValue = Variables.serializedObjectValue("a serialized value").create();
MockHistoricVariableUpdateBuilder builder = MockProvider.mockHistoricVariableUpdate()
.typedValue(serializedValue);
List<HistoricDetail> details = new ArrayList<HistoricDetail>();
details.add(builder.build());
mockedQuery = setUpMockedDetailsQuery(details);
given()
.then().expect().statusCode(Status.OK.getStatusCode())
.and()
.body("[0].value", equalTo("a serialized value"))
.body("[0].variableType", equalTo(VariableTypeHelper.toExpectedValueTypeName(serializedValue.getType())))
.body("[0].errorMessage", nullValue())
.when().get(HISTORIC_DETAIL_RESOURCE_URL);
// should not resolve custom objects but existing API requires it
// verify(mockedQuery).disableCustomObjectDeserialization();