public class IssueChangelogMigrationTest {
@ClassRule
public static TestDatabase db = new TestDatabase().schema(IssueChangelogMigrationTest.class, "schema.sql");
@Mock
System2 system2;
<BUG>Settings settings;
IssueChangelogMigration migration;</BUG>
@Before
public void setUp() throws Exception {
<BUG>when(system2.now()).thenReturn(DateUtils.parseDateTime("2014-02-19T19:10:03+0100").getTime());
settings = new Settings();
settings.setProperty(WorkDurationConvertor.HOURS_IN_DAY_PROPERTY, 8);
migration = new IssueChangelogMigration(db.database(), settings, system2);
</BUG>
}

public class IssueChangelogMigrationTest {
@ClassRule
public static TestDatabase db = new TestDatabase().schema(IssueChangelogMigrationTest.class, "schema.sql");
@Mock
System2 system2;
@Mock
PropertiesDao propertiesDao;
IssueChangelogMigration migration;
@Before
public void setUp() throws Exception {
when(system2.now()).thenReturn(DateUtils.parseDateTime("2014-02-19T19:10:03+0100").getTime());
when(propertiesDao.selectGlobalProperty(WorkDurationConvertor.HOURS_IN_DAY_PROPERTY)).thenReturn(new PropertyDto().setValue("8"));
migration = new IssueChangelogMigration(db.database(), propertiesDao, system2);
}
