source: class TwilioServiceInfoCreatorTest {
  
      private TwilioServiceInfoCreator creator;
  
      @Test
      public void testCreateServiceInfo() {
  
target:         Map<String, Object> empty = new HashMap<String, Object>();
          Map<String, Object> badTypes = new HashMap<String, Object>();
          badTypes.put("name", 1);
          Map<String, Object> badCredTypes = new HashMap<String, Object>();
          badCredTypes.put("twilio_account_sid", 1);
          badCredTypes.put("twilio_auth_token", 1);
          badTypes.put("credentials", badCredTypes);
          Map<String, Object> rawInfo = new HashMap<String, Object>();
          rawInfo.put("name", "id");
          Map<String, Object> rawInfoCreds = new HashMap<String, Object>();
          rawInfoCreds.put("twilio_account_sid", "abc");
          rawInfoCreds.put("twilio_auth_token", "123");
          rawInfo.put("credentials", rawInfoCreds);
          TwilioServiceInfo nullServiceInfo = new TwilioServiceInfo(null, null, null);
          TwilioServiceInfo serviceInfo = new TwilioServiceInfo("id", "abc", "123");
          assertEquals(nullServiceInfo, creator.createServiceInfo(empty));
          assertEquals(nullServiceInfo, creator.createServiceInfo(badTypes));
          assertEquals(serviceInfo, creator.createServiceInfo(rawInfo));
      }
  
  }