@Test public void testGetInMessage_fail() { try { ProvidenceConfigUtil.getInMessage(service, "does_not_exist"); fail("No exception"); } catch (ProvidenceConfigException e) { assertThat(e.getMessage(), is("Message config.Service has no field named does_not_exist")); } try { ProvidenceConfigUtil.getInMessage(service, "does_not_exist.name"); fail("No exception"); } catch (ProvidenceConfigException e) { assertThat(e.getMessage(), is("Message config.Service has no field named does_not_exist")); } try { ProvidenceConfigUtil.getInMessage(service, "db.does_not_exist"); fail("No exception"); } catch (ProvidenceConfigException e) { assertThat(e.getMessage(), is("Message config.Database has no field named does_not_exist")); } try { ProvidenceConfigUtil.getInMessage(service, "name.db"); fail("No exception"); } catch (ProvidenceConfigException e) { assertThat(e.getMessage(), is("Field 'name' is not of message type in config.Service")); } }
static Object getInMessage(PMessage message, String key) throws ProvidenceConfigException { return getInMessage(message, key, null); }
ProvidenceConfigUtil { static Object getInMessage(PMessage message, String key) throws ProvidenceConfigException { return getInMessage(message, key, null); } }
ProvidenceConfigUtil { static Object getInMessage(PMessage message, String key) throws ProvidenceConfigException { return getInMessage(message, key, null); } private  ProvidenceConfigUtil(); }
ProvidenceConfigUtil { static Object getInMessage(PMessage message, String key) throws ProvidenceConfigException { return getInMessage(message, key, null); } private  ProvidenceConfigUtil(); static Path canonicalFileLocation(@Nonnull Path file); }
ProvidenceConfigUtil { static Object getInMessage(PMessage message, String key) throws ProvidenceConfigException { return getInMessage(message, key, null); } private  ProvidenceConfigUtil(); static Path canonicalFileLocation(@Nonnull Path file); static final String UNDEFINED; }