BlotterLookupResource { @GET @Path("frequencies") @Produces(MediaType.APPLICATION_JSON) @SuppressWarnings("deprecation") public String getFrequencies() { return convertToJsonArray(Frequency.class, SimpleFrequencyFactory.INSTANCE.enumerateAvailableFrequencies()); } BlotterLookupResource(StringConvert stringConvert); @GET @Path("frequencies") @Produces(MediaType.APPLICATION_JSON) @SuppressWarnings("deprecation") String getFrequencies(); @GET @Path("exercisetypes") @Produces(MediaType.APPLICATION_JSON) String getExerciseTypes(); @GET @Path("daycountconventions") @Produces(MediaType.APPLICATION_JSON) String getDayCountConventions(); @GET @Path("businessdayconventions") @Produces(MediaType.APPLICATION_JSON) String getBusinessDayConventions(); @GET @Path("barriertypes") @Produces(MediaType.APPLICATION_JSON) String getBarrierTypes(); @GET @Path("barrierdirections") @Produces(MediaType.APPLICATION_JSON) String getBarrierDirections(); @GET @Path("debtseniority") @Produces(MediaType.APPLICATION_JSON) String getDebtSeniority(); @GET @Path("restructuringclause") @Produces(MediaType.APPLICATION_JSON) String getRestructuringClause(); @GET @Path("stubtype") @Produces(MediaType.APPLICATION_JSON) String getStubType(); @GET @Path("samplingfrequencies") @Produces(MediaType.APPLICATION_JSON) String getSamplingFrequencies(); @GET @Path("floatingratetypes") @Produces(MediaType.APPLICATION_JSON) String getFloatingRateTypes(); @GET @Path("longshort") @Produces(MediaType.APPLICATION_JSON) String getLongShort(); @GET @Path("monitoringtype") @Produces(MediaType.APPLICATION_JSON) String getMonitoringType(); @GET @Path("interpolationmethods") @Produces(MediaType.APPLICATION_JSON) String getInterpolationMethods(); @GET @Path("idschemes") @Produces(MediaType.APPLICATION_JSON) @SuppressWarnings("deprecation") String getIdSchemes(); @GET @Path("regions") @Produces(MediaType.APPLICATION_JSON) String getRegions();  }
@Test public void getFrequencies() throws JSONException { JSONArray expected = new JSONArray(Lists.newArrayList( "Continuous", "Daily", "Weekly", "Bi-weekly", "Three week", "Twenty Eight Days", "Monthly", "Bi-monthly", "Quarterly", "Four Month", "Five Month", "Semi-annual", "Seven Month", "Eight Month", "Nine Month", "Ten Month", "Eleven Month", "Annual", "Never")); assertTrue(JsonTestUtils.equal(expected, new JSONArray(_resource.getFrequencies()))); }