Code example for XmlBeanFactory

Methods: getBean

0
     */ 
    public TokenService getTokenService() throws Exception {
        TokenService service;
 
        ClassPathResource config = new ClassPathResource("TokenServiceTest.xml");
        XmlBeanFactory factory = new XmlBeanFactory(config);
 
        service = (TokenService) factory.getBean("tokenService");
        return service;
    } 
 
    @Specification 
    public void testCreateToken() throws Exception {
        assertUserPropertyIdentical("exolab\\castor"); 
        assertUserPropertyIdentical("tyredating\\pdv017@es.euromaster.com"); 
        assertUserPropertyIdentical("tyredating\\pdv017@es\\euromaster\\com"); 
 
    } 
 
    private void assertUserPropertyIdentical(String user) throws AuthenticationException, RemoteException {
Connect your IDE to all the code out there  Get Codota for Java