PayloadFormatManager { public static PayloadFormatter getPayloadFormat(String name) { Preconditions.checkArgument(map.containsKey(name), "Unknown payload format named: " + name); return map.get(name); }  static PayloadFormatter getPayloadFormat(String name);  }
@Test(expected = IllegalArgumentException.class) public void getPayloadFormat() { PayloadFormatManager.getPayloadFormat("txt"); }
@Test public void getDefaultPayloadFormat() { assertNotNull(PayloadFormatManager.getPayloadFormat("json")); }