### Question:
WebHookPayloadXmlVelocityTemplate extends WebHookPayloadXmlTemplate implements WebHookPayload, WebHookContentObjectSerialiser { @Override public String getFormatShortName() { return FORMAT_SHORT_NAME; } WebHookPayloadXmlVelocityTemplate(WebHookPayloadManager manager, WebHookVariableResolverManager variableResolverManager); @Override String getFormatShortName(); @Override String getFormatDescription(); @Override String getFormatToolTipText(); @Override Object serialiseObject(Object object); @Override PayloadTemplateEngineType getTemplateEngineType(); static final String FORMAT_SHORT_NAME; }### Answer:
@Test public void testGetFormatShortName() { assertEquals("xmlVelocityTemplate", whp.getFormatShortName()); }
@Test public void testRegister() { SBuildServer mockServer = mock(SBuildServer.class); when(mockServer.getRootUrl()).thenReturn("http: WebHookPayloadManager wpm = new WebHookPayloadManager(mockServer); WebHookPayloadXmlVelocityTemplate whp = new WebHookPayloadXmlVelocityTemplate(wpm, variableResolverManager); whp.register(); assertEquals(whp, wpm.getFormat(whp.getFormatShortName())); }