### Question:
HttpProtocolGeneratorUtils { public static String getTimestampOutputParam(String dataSource, Location bindingType, Shape shape, Format format) { String modifiedSource; switch (format) { case DATE_TIME: case HTTP_DATE: modifiedSource = dataSource; break; case EPOCH_SECONDS: modifiedSource = dataSource; if (bindingType.equals(Location.HEADER)) { modifiedSource = "parseInt(" + modifiedSource + ", 10)"; } modifiedSource = "Math.round(" + modifiedSource + " * 1000)"; break; default: throw new CodegenException("Unexpected timestamp format `" + format.toString() + "` on " + shape); } return "new Date(" + modifiedSource + ")"; } private  HttpProtocolGeneratorUtils(); static String getTimestampInputParam(
            GenerationContext context,
            String dataSource,
            Shape shape,
            Format format
    ); static String getTimestampOutputParam(String dataSource, Location bindingType, Shape shape, Format format); static void writeRetryableTrait(TypeScriptWriter writer, StructureShape error, String separator);  }### Answer:
@Test public void givesCorrectTimestampDeserialization() { TimestampShape shape = TimestampShape.builder().id("com.smithy.example#Foo").build(); assertThat("new Date(" + DATA_SOURCE + ")", equalTo(HttpProtocolGeneratorUtils.getTimestampOutputParam(DATA_SOURCE, Location.DOCUMENT, shape, Format.DATE_TIME))); assertThat("new Date(Math.round(" + DATA_SOURCE + " * 1000))", equalTo(HttpProtocolGeneratorUtils.getTimestampOutputParam(DATA_SOURCE, Location.DOCUMENT, shape, Format.EPOCH_SECONDS))); assertThat("new Date(" + DATA_SOURCE + ")", equalTo(HttpProtocolGeneratorUtils.getTimestampOutputParam(DATA_SOURCE, Location.DOCUMENT, shape, Format.HTTP_DATE))); }