### Question:
ReplaceCustomerIdAction extends BasicAction { @Override public HttpRequest execute(HttpRequest req, String internalURI, HttpResponse tokenValidationResponse) { String newURI = internalURI.replace(CUSTOMER_ID, BasicAction.getUserId(tokenValidationResponse)); req.setUri(newURI); return req; }  @Override HttpRequest execute(HttpRequest req, String internalURI, HttpResponse tokenValidationResponse);  }### Answer:
@Test public void when_execute_replace_customerId() { HttpResponse validationResponse = mock(HttpResponse.class); ChannelBuffer content = ChannelBuffers.copiedBuffer(("{\"valid\":true,\"codeId\":\"\",\"scope\":\"basic scope2\"," + "\"details\":null,\"token\":\"f60971beb3881ea0bd5675a5baf2a47e95332277\",\"created\":1409043454427,\"expiresIn\":\"300\"," + "\"userId\":\"1223\",\"refreshToken\":\"ae79692416349da03fcdff1beca6e131ab3e5de1\",\"type\":\"Bearer\",\"clientId\":\"196657904238186\"}").getBytes(CharsetUtil.UTF_8)); willReturn(content).given(validationResponse).getContent(); HttpRequest request = action.execute(req, "/customer/" + ReplaceCustomerIdAction.CUSTOMER_ID, validationResponse); assertEquals(request.getUri(), "/customer/1223"); }