### Question:
BasicSubjectServletCreator implements SubjectCreate { @Override public boolean canSupportSubject(Object context) { if (context instanceof HttpServletRequest) { String authorization = ((HttpServletRequest)context).getHeader(AUTHORIZATION); return authorization != null && authorization.startsWith(BASIC); } else { return false; } }  @Override boolean canSupportSubject(Object context); @Override Subject createSubject(Object context);  }### Answer:
@Test public void canSupportSubject() { HttpServletRequest request = createNiceMock(HttpServletRequest.class); expect(request.getHeader(AUTHORIZATION)).andReturn(BASIC + "12345"); replay(request); assertTrue(creator.canSupportSubject(request)); verify(request); reset(request); expect(request.getHeader(AUTHORIZATION)).andReturn("12345"); replay(request); assertFalse(creator.canSupportSubject(request)); verify(request); }