### Question:
TransactionLogStorageFactory { public static TransactionLogStorage createTransactionLogStorage(final TransactionLogDataSource transactionLogDataSource) { switch (transactionLogDataSource.getType()) { case MEMORY: return new MemoryTransactionLogStorage(); case RDB: return new RdbTransactionLogStorage(transactionLogDataSource.getDataSource()); default: throw new UnsupportedOperationException(); } }  static TransactionLogStorage createTransactionLogStorage(final TransactionLogDataSource transactionLogDataSource);  }### Answer:
@Test public void assertCreateMemoryTransactionLogStorageFactory() { TransactionLogDataSource transactionLogDataSource = new MemoryTransactionLogDataSource(); assertThat(TransactionLogStorageFactory.createTransactionLogStorage(transactionLogDataSource), instanceOf(TransactionLogStorage.class)); }
@Test public void assertCreateRdbTransactionLogStorageFactory() { DataSource dataSource = mock(DataSource.class); TransactionLogDataSource transactionLogDataSource = new RdbTransactionLogDataSource(dataSource); assertThat(TransactionLogStorageFactory.createTransactionLogStorage(transactionLogDataSource), instanceOf(TransactionLogStorage.class)); }