// Path: opentipbot-service/src/test/java/opentipbot/service/config/ServiceTestConfig.java
// @Configuration
// @ComponentScan(basePackages = {
//         "opentipbot.service"
// })
// @Import({PersistenceContext.class,  ServiceSocialConfig.class})
// @PropertySource("classpath:application.properties")
// public class ServiceTestConfig {
// }
// 
// Path: opentipbot-service/src/main/java/opentipbot/service/exception/OpenTipBotServiceException.java
// public class OpenTipBotServiceException extends Exception {
// 
//     //the opentipbotCommand object which has generated this exception
//     private OpenTipBotCommand command;
// 
//     /**
//      * Build BitcoinServiceException with a message only
//      * @param message
//      */
//     public OpenTipBotServiceException(String message) {
//         super(message);
//     }
// 
//     /**
//      * Build BitcoinServiceException with message and cause
//      * @param message
//      * @param cause
//      */
//     public OpenTipBotServiceException(String message, Throwable cause) {
//         super(message, cause);
//     }
// 
//     /**
//      * Build BitcoinServiceException with message and specific BitcoinServiceException fields
//      * @param message
//      * @param command
//      */
//     public OpenTipBotServiceException(String message, OpenTipBotCommand command) {
//         super(message);
//         this.command = command;
//     }
// 
//     /**
//      * Build BitcoinServiceException with message, cause and specific BitcoinServiceException fields
//      * @param message
//      * @param cause
//      * @param command
//      */
//     public OpenTipBotServiceException(String message, Throwable cause, OpenTipBotCommand command) {
//         super(message, cause);
//         this.command = command;
//     }
// 
//     // Getters and setters
//     //********************
// 
// 
//     public OpenTipBotCommand getCommand() {
//         return command;
//     }
// 
//     public void setCommand(OpenTipBotCommand command) {
//         this.command = command;
//     }
// }


import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.AbstractTransactionalJUnit4SpringContextTests;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.transaction.TransactionConfiguration;
import org.springframework.transaction.annotation.Transactional;
import opentipbot.service.config.ServiceTestConfig;
import opentipbot.service.exception.OpenTipBotServiceException;
package opentipbot.service;


/**
 * @author Gilles Cadignan
 */
@ContextConfiguration(classes = ServiceTestConfig.class)
@Transactional
@TransactionConfiguration(transactionManager="transactionManager", defaultRollback=true)
@RunWith(SpringJUnit4ClassRunner.class)
public class OpenTipBotServiceTest extends AbstractTransactionalJUnit4SpringContextTests
{
    @Autowired
    protected OpenTipBotService opentipbotService;

    @Test
    public void handleNewTweetsTest()
    {
        try {
            opentipbotService.handleNewTweets();
// Path: opentipbot-service/src/test/java/opentipbot/service/config/ServiceTestConfig.java
// @Configuration
// @ComponentScan(basePackages = {
//         "opentipbot.service"
// })
// @Import({PersistenceContext.class,  ServiceSocialConfig.class})
// @PropertySource("classpath:application.properties")
// public class ServiceTestConfig {
// }
// 
// Path: opentipbot-service/src/main/java/opentipbot/service/exception/OpenTipBotServiceException.java
// public class OpenTipBotServiceException extends Exception {
// 
//     //the opentipbotCommand object which has generated this exception
//     private OpenTipBotCommand command;
// 
//     /**
//      * Build BitcoinServiceException with a message only
//      * @param message
//      */
//     public OpenTipBotServiceException(String message) {
//         super(message);
//     }
// 
//     /**
//      * Build BitcoinServiceException with message and cause
//      * @param message
//      * @param cause
//      */
//     public OpenTipBotServiceException(String message, Throwable cause) {
//         super(message, cause);
//     }
// 
//     /**
//      * Build BitcoinServiceException with message and specific BitcoinServiceException fields
//      * @param message
//      * @param command
//      */
//     public OpenTipBotServiceException(String message, OpenTipBotCommand command) {
//         super(message);
//         this.command = command;
//     }
// 
//     /**
//      * Build BitcoinServiceException with message, cause and specific BitcoinServiceException fields
//      * @param message
//      * @param cause
//      * @param command
//      */
//     public OpenTipBotServiceException(String message, Throwable cause, OpenTipBotCommand command) {
//         super(message, cause);
//         this.command = command;
//     }
// 
//     // Getters and setters
//     //********************
// 
// 
//     public OpenTipBotCommand getCommand() {
//         return command;
//     }
// 
//     public void setCommand(OpenTipBotCommand command) {
//         this.command = command;
//     }
// }


// Path: opentipbot-service/src/test/java/opentipbot/service/OpenTipBotServiceTest.java
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.AbstractTransactionalJUnit4SpringContextTests;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.transaction.TransactionConfiguration;
import org.springframework.transaction.annotation.Transactional;
import opentipbot.service.config.ServiceTestConfig;
import opentipbot.service.exception.OpenTipBotServiceException;

package opentipbot.service;


/**
 * @author Gilles Cadignan
 */
@ContextConfiguration(classes = ServiceTestConfig.class)
@Transactional
@TransactionConfiguration(transactionManager="transactionManager", defaultRollback=true)
@RunWith(SpringJUnit4ClassRunner.class)
public class OpenTipBotServiceTest extends AbstractTransactionalJUnit4SpringContextTests
{
    @Autowired
    protected OpenTipBotService opentipbotService;

    @Test
    public void handleNewTweetsTest()
    {
        try {
            opentipbotService.handleNewTweets();
        } catch (OpenTipBotServiceException e) {