@Test
public void getProperty() {

    final Map<String, String> expected = new HashMap<>();
    expected.put("test.prop", "test_value");
    new Expectations() {
        {
            priamServer.getConfiguration();
            result = fakeConfiguration;
            times = 3;
        }
    };
    String expectedJsonString = GsonJsonSerializer.getGson().toJson(expected);
    Response response = resource.getProperty("test.prop", null);
    assertEquals(200, response.getStatus());
    assertEquals(expectedJsonString, response.getEntity());
    Map<String, Object> result =
            GsonJsonSerializer.getGson().fromJson(response.getEntity().toString(), Map.class);
    assertNotNull(result);
    assertTrue(!result.isEmpty());
    Response defaultResponse = resource.getProperty("not.a.property", "NOVALUE");
    expected.clear();
    expected.put("not.a.property", "NOVALUE");
    expectedJsonString = GsonJsonSerializer.getGson().toJson(expected);
    assertEquals(200, defaultResponse.getStatus());
    assertEquals(expectedJsonString, defaultResponse.getEntity());
    result =
            GsonJsonSerializer.getGson()
                    .fromJson(defaultResponse.getEntity().toString(), Map.class);
    assertEquals(result, expected);
    Response badResponse = resource.getProperty("not.a.property", null);
    assertEquals(404, badResponse.getStatus());
}