### Question:
WebHookPayloadManager { public WebHookPayload getFormat(String formatShortname){ if (formats.containsKey(formatShortname.toLowerCase())){ return formats.get(formatShortname.toLowerCase()); } throw new UnsupportedWebHookFormatException(formatShortname); } WebHookPayloadManager(SBuildServer server); void registerPayloadFormat(WebHookPayload payloadFormat); WebHookPayload getFormat(String formatShortname); Boolean isRegisteredFormat(String format); List<WebHookPayload> getRegisteredFormats(); List<WebHookPayload> getTemplatedFormats(); Collection<WebHookPayload> getRegisteredFormatsAsCollection(); SBuildServer getServer();  }### Answer:
@Test public void testGetFormat() { assertEquals("one", manager.getFormat("one").getFormatShortName()); }
@Test public void testGetNonExistantFormatThrowsException() { try { manager.getFormat("none"); } catch(UnsupportedWebHookFormatException ex) { assert(true); } catch (Exception e) { fail(); } }