Package org.ejbca.util

Examples of org.ejbca.util.SimpleMock


         * Some slight reflective manipulation of crmfMessageHandler here in
         * order to get around the fact that we're not running any of the logic
         * in its usual constructor, instead using the empty default one.
         */
        SimpleMock.inject(crmfMessageHandler, "admin", new Admin(Admin.TYPE_RA_USER));
        final UserAdminSessionRemote userAdminSessionMock = new SimpleMock(UserAdminSessionRemote.class) {{
          map("findUserBySubjectDN", new UserDataVO() {
        private static final long serialVersionUID = 1L;
        public String getUsername() { return USER_NAME; };
      });
        }}.mock();
        SimpleMock.inject(crmfMessageHandler, "userAdminSession", userAdminSessionMock);
        SimpleMock.inject(crmfMessageHandler, "signSession", new SimpleMock(SignSessionRemote.class).mock());
        final CrmfRequestMessage requestMock = new CrmfRequestMessage() {
            private static final long serialVersionUID = 1L;
            public String getSubjectDN() {
                return "foo"// Just return something that isn't null
            }
View Full Code Here

TOP

Related Classes of org.ejbca.util.SimpleMock

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.