XTrackMDCPutFilter extends AbstractMDCPutFilter { @Override protected String getMDCKey(HttpServletRequest request, HttpServletResponse response) { return attributeName; }  void setAttributeName(String attributeName);  }
@Test public void testGetMDCKey_default() throws ServletException { xTrackMDCPutFilter.init(mockFilterConfig); assertThat(xTrackMDCPutFilter.getMDCKey(null, null), is("X-Track")); }
@Test public void testGetMDCKey_changed_by_initParam() throws ServletException { mockFilterConfig.addInitParameter("attributeName", "X-Hoge"); xTrackMDCPutFilter.init(mockFilterConfig); assertThat(xTrackMDCPutFilter.getMDCKey(null, null), is("X-Hoge")); }