### Question:
ProcessDefinitionDesignResource extends CommonResource { protected String replaceLongIdToString(final String design) throws IOException { return design.replaceAll("([^\\\\]\"id\"\\s*:\\s*)(\\d+)", "$1\"$2\""); } ProcessDefinitionDesignResource(final ProcessAPI processAPI); @Get("json") String getDesign();  }### Answer:
@Test public void testReplaceLongIdToString() throws Exception { assertThat(processDefinitionDesignResource.replaceLongIdToString("{ \"id\": 123}")).isEqualToIgnoringCase("{ \"id\": \"123\"}"); assertThat(processDefinitionDesignResource.replaceLongIdToString("{ \"id\":123, \"test\": [ otherid: \"zerze\"]}")).isEqualToIgnoringCase( "{ \"id\":\"123\", \"test\": [ otherid: \"zerze\"]}"); assertThat(processDefinitionDesignResource.replaceLongIdToString("{ \"iaed\": 123}")).isEqualToIgnoringCase("{ \"iaed\": 123}"); assertThat(processDefinitionDesignResource.replaceLongIdToString("{ \"name\": \"\\\"id\\\": 123\"}")).isEqualToIgnoringCase( "{ \"name\": \"\\\"id\\\": 123\"}"); assertThat(processDefinitionDesignResource.replaceLongIdToString("{ \"name\": \"\\\"id\\\": 123\"}")).isEqualToIgnoringCase( "{ \"name\": \"\\\"id\\\": 123\"}"); }