/** Testing save, fail normal due to lack of mongo connection. */ @Test(expected = Exception.class) public void testClientSave() { SecurityClassification sc = new SecurityClassification(); sc.setClassification("UNCLASSIFIED"); ResourceMetadata rm = new ResourceMetadata(); rm.setName("testname"); rm.setDescription("test description"); rm.setClassType(sc); Service service = new Service(); service.setContractUrl("www.google.com"); service.setServiceId(String.valueOf((int) (Math.random() * 1000000))); service.setUrl("www.google.com"); service.setResourceMetadata(rm); service.setMethod("GET"); mongoAccessor.save(service); }
/** Testing client */ @Test public void testClient() { mongoAccessor.getClient(); }