@Test public void verifyContentTypeTest() throws DSPException { OpenRTBAPIDummyTest bidder = new OpenRTBAPIDummyTest(); DemandSideDAODummyTest dao = new DemandSideDAODummyTest(); URL url = this.getClass().getResource("/properties.json"); dao.loadData(url.getPath()); DemandSideServer server = new DemandSideServer(bidder, dao); boolean validate = server.verifyContentType("BigAdExchange",JSON_CONTENT_TYPE); assertTrue("Not valid Content Type", validate); }
public synchronized boolean verifyContentType(String sspName, String contentType) throws DSPException { if (authorizeRemoteService(sspName)) { if (dspDAO.getExchanges().get(sspName).getRtbContentType() .equals(contentType)) { return true; } } return false; }
DemandSideServer { public synchronized boolean verifyContentType(String sspName, String contentType) throws DSPException { if (authorizeRemoteService(sspName)) { if (dspDAO.getExchanges().get(sspName).getRtbContentType() .equals(contentType)) { return true; } } return false; } }
DemandSideServer { public synchronized boolean verifyContentType(String sspName, String contentType) throws DSPException { if (authorizeRemoteService(sspName)) { if (dspDAO.getExchanges().get(sspName).getRtbContentType() .equals(contentType)) { return true; } } return false; } DemandSideServer();  DemandSideServer(OpenRTBAPI bidder, DemandSideDAO dao); }
DemandSideServer { public synchronized boolean verifyContentType(String sspName, String contentType) throws DSPException { if (authorizeRemoteService(sspName)) { if (dspDAO.getExchanges().get(sspName).getRtbContentType() .equals(contentType)) { return true; } } return false; } DemandSideServer();  DemandSideServer(OpenRTBAPI bidder, DemandSideDAO dao); void init(String dbLocation); boolean authorizeRemoteService(String sspOrgName); synchronized boolean verifyContentType(String sspName,
			String contentType); byte[] respond(String sspName, InputStream inStream,
			String requestContentType); BidRequest readRequest(InputStream is, String contentType); }
DemandSideServer { public synchronized boolean verifyContentType(String sspName, String contentType) throws DSPException { if (authorizeRemoteService(sspName)) { if (dspDAO.getExchanges().get(sspName).getRtbContentType() .equals(contentType)) { return true; } } return false; } DemandSideServer();  DemandSideServer(OpenRTBAPI bidder, DemandSideDAO dao); void init(String dbLocation); boolean authorizeRemoteService(String sspOrgName); synchronized boolean verifyContentType(String sspName,
			String contentType); byte[] respond(String sspName, InputStream inStream,
			String requestContentType); BidRequest readRequest(InputStream is, String contentType);  }