CustomStorageMap implements Map<String, String> { public List<String> getAsList(Object key) { return Arrays.asList(get(key).split(SEPARATOR)); } CustomStorageMap(Map<String, String> map);  CustomStorageMap(Map<String, String> map, Level level, Block block, Order order); @Override int size(); @Override boolean isEmpty(); @Override boolean containsKey(Object key); @Override boolean containsValue(Object value); @Override String get(Object key); List<String> getAsList(Object key); @Override String put(String key, String value); @Override String remove(Object key); @Override void putAll(@NotNull Map<? extends String, ? extends String> m); @Override void clear(); @NotNull @Override Set<String> keySet(); @NotNull @Override Collection<String> values(); @NotNull @Override Set<Entry<String, String>> entrySet(); static String[] parseData(String key); static final byte KEY_INDEX; static final byte LEVEL_INDEX; static final byte BLOCK_INDEX; static final byte ORDER_INDEX; }
@Test public void testGetAsList() throws Exception { when(map.get(eq("text"))).thenReturn("a::b::c)"); final Collection<String> collection = customStorageMap.getAsList("text"); assertThat(collection.size(), is(3)); }