}
@Test
public void testGetArticles(){
ArticlesAddAction dto1 = createArticlesDtoIn(tag);
Product product1 = oam.insertArticle(dto1, userId);
ArticlesAddAction dto2 = createArticlesDtoIn(Tags.entertainment);
Product product2 = oam.insertArticle(dto2, userId);
LookForAction action1 = new LookForAction(dto1.getTag(), null);
Map<String, IArticlesDto> articles1 = oam.getArticles(action1, null);
assertEquals(1, articles1.size());
String key1 = KeyFactory.keyToString(product1.getKey());
assertTrue(articles1.containsKey(key1));
assertEquals(dto1.getTag(), articles1.get(key1).getTag());
LookForAction action2 = new LookForAction(null, KeyFactory.keyToString(product2.getKey()));
Map<String, IArticlesDto> articles2 = oam.getArticles(action2, null);
assertEquals(1, articles2.size());
String key2 = KeyFactory.keyToString(product2.getKey());
assertTrue(articles2.containsKey(key2));
assertEquals(dto2.getTag(), articles2.get(key2).getTag());
}