@Test public void getGenesisTransactionByAssetAcceptedStatusThrowsCantCheckAssetDistributionProgressException() throws Exception { when(pluginDatabaseSystem.openDatabase( pluginId, AssetDistributionDatabaseConstants.ASSET_DISTRIBUTION_DATABASE)) .thenThrow(new CantOpenDatabaseException("error")); try { mockAssetDistributionDao.getGenesisTransactionByAssetAcceptedStatus(); fail("The method didn't throw when I expected it to"); } catch (Exception ex) { Assert.assertTrue(ex instanceof CantCheckAssetDistributionProgressException); } }
@Test public void getGenesisTransactionByAssetAcceptedStatusTest() throws CantCheckAssetDistributionProgressException { List<String> list = mockAssetDistributionDao.getGenesisTransactionByAssetAcceptedStatus(); Assert.assertNotNull(list); }