test/src/kbasesearchengine/test/parse/ObjectParserTest.java
@Test
    public void parseObjectsRNASeqSampleSetTest() throws Exception {

        final String jsonResource = "rnaseqsampleset01";
        final String type = "RNASeqSampleSet";
        final String guid = "WS:1/1/1";

        final Map<GUID, String> guidToJson = parseSubObjects(type, jsonResource, guid);

        assertThat(guidToJson.size(), is(1));
        final String jsonString = guidToJson.values().iterator().next();
        @SuppressWarnings("unchecked")
        HashMap<String, Object> result = new ObjectMapper().readValue(jsonString, HashMap.class);

        HashMap<String, Object> expectedResult = new HashMap<String, Object>();
        expectedResult.put("sampleset_desc", "Arabidopsis thaliana wild type and hy5-215 seedlings grown under white light.");
        expectedResult.put("source", "NCBI SRP003951");
        expectedResult.put("num_samples", 4);
        expectedResult.put("num_replicates", 3);

        assertThat(result, is(expectedResult));
    }
/**
     * Testing parsing RNASeqSampleSet object
     *
     * @throws Exception
     */
Testing parsing RNASeqSampleSet object
@throws Exception
Testing parsing RNASeqSampleSet object @throws Exception
@Test
    public void parseObjectsRNASeqSampleSetTest() throws Exception {
        final String jsonResource = "rnaseqsampleset01";
        final String type = "RNASeqSampleSet";
        final String guid = "WS:1/1/1";
        final Map<GUID, String> guidToJson = parseSubObjects(type, jsonResource, guid);
        assertThat(guidToJson.size(), is(1));
        final String jsonString = guidToJson.values().iterator().next();
        @SuppressWarnings("unchecked")
        HashMap<String, Object> result = new ObjectMapper().readValue(jsonString, HashMap.class);
        HashMap<String, Object> expectedResult = new HashMap<String, Object>();
        expectedResult.put("sampleset_desc", "Arabidopsis thaliana wild type and hy5-215 seedlings grown under white light.");
        expectedResult.put("source", "NCBI SRP003951");
        expectedResult.put("num_samples", 4);
        expectedResult.put("num_replicates", 3);
        assertThat(result, is(expectedResult));
    }
@ Test public void parseObjectsRNASeqSampleSetTest ( ) throws Exception { final String jsonResource = "rnaseqsampleset01" ; final String type = "RNASeqSampleSet" ; final String guid = "WS:1/1/1" ; final Map < GUID , String > guidToJson = parseSubObjects ( type , jsonResource , guid ) ; assertThat ( guidToJson . size ( ) , is ( 1 ) ) ; final String jsonString = guidToJson . values ( ) . iterator ( ) . next ( ) ; @ SuppressWarnings ( "unchecked" ) HashMap < String , Object > result = new ObjectMapper ( ) . readValue ( jsonString , HashMap . class ) ; HashMap < String , Object > expectedResult = new HashMap < String , Object > ( ) ; expectedResult . put ( "sampleset_desc" , "Arabidopsis thaliana wild type and hy5-215 seedlings grown under white light." ) ; expectedResult . put ( "source" , "NCBI SRP003951" ) ; expectedResult . put ( "num_samples" , 4 ) ; expectedResult . put ( "num_replicates" , 3 ) ; assertThat ( result , is ( expectedResult ) ) ; }
Testing parsing RNASeqSampleSet object
 @throws Exception
Testing parsing RNASeqSampleSet object @throws Exception