@Test public void testGetBuildProperties() { BuildProperties validProperties = new BuildProperties().setValid(true); doReturn(validProperties).when(mockBuildPropertiesReader).getFirstServiceBuildProperties(); BuildProperties result = ServiceBuildPropertiesContainer.getBuildProperties(); Assert.assertEquals(result, validProperties); BuildProperties resultCached = ServiceBuildPropertiesContainer.getBuildProperties(); Assert.assertEquals(resultCached, validProperties); }
protected synchronized static BuildProperties getBuildProperties() { if(buildProperties == null) { buildProperties = buildPropertyReader.getFirstServiceBuildProperties(); if(buildProperties == null) { buildProperties = new BuildProperties(); } } return buildProperties; }
ServiceBuildPropertiesContainer { protected synchronized static BuildProperties getBuildProperties() { if(buildProperties == null) { buildProperties = buildPropertyReader.getFirstServiceBuildProperties(); if(buildProperties == null) { buildProperties = new BuildProperties(); } } return buildProperties; } }
ServiceBuildPropertiesContainer { protected synchronized static BuildProperties getBuildProperties() { if(buildProperties == null) { buildProperties = buildPropertyReader.getFirstServiceBuildProperties(); if(buildProperties == null) { buildProperties = new BuildProperties(); } } return buildProperties; }  }
ServiceBuildPropertiesContainer { protected synchronized static BuildProperties getBuildProperties() { if(buildProperties == null) { buildProperties = buildPropertyReader.getFirstServiceBuildProperties(); if(buildProperties == null) { buildProperties = new BuildProperties(); } } return buildProperties; }  static void logServiceBuildString(Logger logger); static void logServiceBuildString(Logger logger, boolean throwExceptionIfMissing); static void setBuildPropertyReader(BuildPropertiesReader buildPropertyReader); }
ServiceBuildPropertiesContainer { protected synchronized static BuildProperties getBuildProperties() { if(buildProperties == null) { buildProperties = buildPropertyReader.getFirstServiceBuildProperties(); if(buildProperties == null) { buildProperties = new BuildProperties(); } } return buildProperties; }  static void logServiceBuildString(Logger logger); static void logServiceBuildString(Logger logger, boolean throwExceptionIfMissing); static void setBuildPropertyReader(BuildPropertiesReader buildPropertyReader); final static String BUILD_PROPERTIES_FILE; }