@Test public void getCorruptConfiguration_raisesException() { String xsuaaBinding = "{\"xsuaa\": [{ \"credentials\": null }]}"; assertThatThrownBy(() -> { cut = CFEnvironment.getInstance((str) -> xsuaaBinding, (str) -> null); }).isInstanceOf(JsonParsingException.class).hasMessageContainingAll( "The credentials of 'VCAP_SERVICES' can not be parsed for service 'XSUAA'", "Please check the service binding."); }
public static CFEnvironment getInstance() { return getInstance(System::getenv, System::getProperty); }
CFEnvironment implements Environment { public static CFEnvironment getInstance() { return getInstance(System::getenv, System::getProperty); } }
CFEnvironment implements Environment { public static CFEnvironment getInstance() { return getInstance(System::getenv, System::getProperty); } private  CFEnvironment(); }
CFEnvironment implements Environment { public static CFEnvironment getInstance() { return getInstance(System::getenv, System::getProperty); } private  CFEnvironment(); static CFEnvironment getInstance(); @Override OAuth2ServiceConfiguration getXsuaaConfiguration(); @Nullable @Override OAuth2ServiceConfiguration getIasConfiguration(); @Override int getNumberOfXsuaaConfigurations(); @Override OAuth2ServiceConfiguration getXsuaaConfigurationForTokenExchange(); @Override Type getType(); @Nullable OAuth2ServiceConfiguration loadForServicePlan(Service service, Plan plan); }
CFEnvironment implements Environment { public static CFEnvironment getInstance() { return getInstance(System::getenv, System::getProperty); } private  CFEnvironment(); static CFEnvironment getInstance(); @Override OAuth2ServiceConfiguration getXsuaaConfiguration(); @Nullable @Override OAuth2ServiceConfiguration getIasConfiguration(); @Override int getNumberOfXsuaaConfigurations(); @Override OAuth2ServiceConfiguration getXsuaaConfigurationForTokenExchange(); @Override Type getType(); @Nullable OAuth2ServiceConfiguration loadForServicePlan(Service service, Plan plan);  }