### Question:
ProjectMsTeamsNotificationsBean { public static ProjectMsTeamsNotificationsBean build(MsTeamsNotificationProjectSettings projSettings, SProject project, MsTeamsNotificationMainSettings mainSettings){ ProjectMsTeamsNotificationsBean bean = new ProjectMsTeamsNotificationsBean(); List<SBuildType> projectBuildTypes = TeamCityIdResolver.getOwnBuildTypes(project); bean.projectId = TeamCityIdResolver.getInternalProjectId(project); bean.msTeamsNotificationList = new LinkedHashMap<String, MsTeamsnotificationConfigAndBuildTypeListHolder>(); MsTeamsNotificationConfig newBlankConfig = new MsTeamsNotificationConfig("", true, new BuildState().setAllEnabled(), true, true, null, true, true); newBlankConfig.setUniqueKey("new"); addMsTeamsNotificationConfigHolder(bean, projectBuildTypes, newBlankConfig, mainSettings); for (MsTeamsNotificationConfig config : projSettings.getMsTeamsNotificationsAsList()){ addMsTeamsNotificationConfigHolder(bean, projectBuildTypes, config, mainSettings); } return bean; }  static ProjectMsTeamsNotificationsBean build(MsTeamsNotificationProjectSettings projSettings, SProject project, MsTeamsNotificationMainSettings mainSettings); static ProjectMsTeamsNotificationsBean build(MsTeamsNotificationProjectSettings projSettings, SBuildType sBuildType, SProject project, MsTeamsNotificationMainSettings mainSettings);  }### Answer:
@Test public void JsonSerialisationTest() throws JDOMException, IOException { ServerPaths serverPaths = mock(ServerPaths.class); MsTeamsNotificationMainSettings myMainSettings = new MsTeamsNotificationMainSettings(sBuildServer, serverPaths); framework = MsTeamsNotificationMockingFrameworkImpl.create(BuildStateEnum.BUILD_FINISHED); framework.loadMsTeamsNotificationProjectSettingsFromConfigXml(new File("../tcmsteamsbuildnotifier-core/src/test/resources/project-settings-test-all-states-enabled-with-specific-builds.xml")); ProjectMsTeamsNotificationsBean msteamsnotificationsConfig = ProjectMsTeamsNotificationsBean.build(framework.getMsTeamsNotificationProjectSettings() , framework.getServer().getProjectManager().findProjectById("project01"), myMainSettings); System.out.println(ProjectMsTeamsNotificationsBeanJsonSerialiser.serialise(msteamsnotificationsConfig)); }
@Test public void JsonBuildSerialisationTest() throws JDOMException, IOException { ServerPaths serverPaths = mock(ServerPaths.class); MsTeamsNotificationMainSettings myMainSettings = new MsTeamsNotificationMainSettings(sBuildServer, serverPaths); framework = MsTeamsNotificationMockingFrameworkImpl.create(BuildStateEnum.BUILD_FINISHED); framework.loadMsTeamsNotificationProjectSettingsFromConfigXml(new File("../tcmsteamsbuildnotifier-core/src/test/resources/project-settings-test-all-states-enabled-with-specific-builds.xml")); ProjectMsTeamsNotificationsBean msteamsnotificationsConfig = ProjectMsTeamsNotificationsBean.build(framework.getMsTeamsNotificationProjectSettings() ,framework.getSBuildType() ,framework.getServer().getProjectManager().findProjectById("project01"), myMainSettings); System.out.println(ProjectMsTeamsNotificationsBeanJsonSerialiser.serialise(msteamsnotificationsConfig)); }