<commit_before><commit_msg>cassandra plugin done<commit_after>package org.safehaus.subutai.plugin.cassandra.rest;

import com.google.common.collect.Lists;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.runners.MockitoJUnitRunner;
import org.safehaus.subutai.core.tracker.api.Tracker;
import org.safehaus.subutai.plugin.cassandra.api.Cassandra;
import org.safehaus.subutai.plugin.cassandra.api.CassandraClusterConfig;

import java.util.List;

import static org.junit.Assert.assertEquals;
import static org.mockito.Mockito.when;

@RunWith(MockitoJUnitRunner.class)
public class RestServiceImplTest
{
    private RestServiceImpl restService;
    @Mock
    Cassandra cassandra;
    @Mock
    Tracker tracker;
    @Mock
    CassandraClusterConfig cassandraClusterConfig;


    @Before
    public void setUp() throws Exception
    {
        restService = new RestServiceImpl();
        restService.setCassandraManager(cassandra);

    }

    @Test
    public void testGetCassandraManager() throws Exception
    {
        Cassandra cas = restService.getCassandraManager();

        // asserts
        assertEquals(cassandra,cas);
    }

    @Test
    public void testSetCassandraManager() throws Exception
    {
        restService.setCassandraManager(cassandra);
        Cassandra cas = restService.getCassandraManager();

        // asserts
        assertEquals(cassandra, cas);
    }

    @Test
    public void testListClusters() throws Exception
    {
        List<CassandraClusterConfig> myList = Lists.newArrayList();
        myList.add(cassandraClusterConfig);
        when(cassandra.getClusters()).thenReturn(myList);
        when(cassandraClusterConfig.getClusterName()).thenReturn("test");

//        restService.listClusters();
    }

    @Test
    public void testGetCluster() throws Exception
    {

    }

    @Test
    public void testCreateCluster() throws Exception
    {

    }

    @Test
    public void testDestroyCluster() throws Exception
    {

    }

    @Test
    public void testStartCluster() throws Exception
    {

    }

    @Test
    public void testStopCluster() throws Exception
    {

    }

    @Test
    public void testAddNode() throws Exception
    {

    }

    @Test
    public void testDestroyNode() throws Exception
    {

    }

    @Test
    public void testCheckNode() throws Exception
    {

    }
}
{'fraction_non_alphanumeric': 0.0869205298013245, 'fraction_numerical': 0.0, 'mean_word_length': 3.035058430717863, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1800061', 'n_tokens_mistral': 727, 'n_tokens_neox': 688, 'n_words': 141}