OnlineDbMVStoreUtils { public static String postContingencyStateKey(Integer stateId, String contingencyId) { return String.format("%03d", stateId) + "_" + contingencyId; } private  OnlineDbMVStoreUtils(); static String contingenciesIdsToJson(Collection<String> contingenciesIds); static Collection<String> jsonToContingenciesIds(String json); static String actionsIdsToJson(List<String> actionsIds); static List<String> jsonToActionsIds(String json); static String indexesDataToJson(Map<String, Boolean> indexesData); static Map<String, Boolean> jsonToIndexesData(String json); static String stateIdsToJson(Collection<Integer> statesIds); static Collection<Integer> jsonToStatesIds(String json); static String indexesTypesToJson(Set<SecurityIndexType> securityIndexTypes); static Set<SecurityIndexType> jsonToIndexesTypes(String json); static String violationToJson(Violation violation); static Violation jsonToViolation(String json); static String limitViolationToJson(LimitViolation violation); static LimitViolation jsonToLimitViolation(String json, Network network); static String actionParametersToJson(ActionParameters actionParameters); static ActionParameters jsonToActionParameters(String json); static String countriesToJson(Set<Country> countries); static Set<Country> jsonToCountries(String json); static OnlineProcess jsonToProcess(String json); static String branchesDataToCsvHeaders(LinkedHashMap<String, Double> branchesData); static String branchesDataToCsv(String networkId, Integer stateId, String contingencyId, LinkedHashMap<String, Double> branchesData); static String postContingencyStateKey(Integer stateId, String contingencyId);  }
@Test public void postContingencyStateKey() { assertEquals("001_contingency", OnlineDbMVStoreUtils.postContingencyStateKey(1, "contingency")); assertEquals("020_contingency", OnlineDbMVStoreUtils.postContingencyStateKey(20, "contingency")); assertEquals("240_contingency", OnlineDbMVStoreUtils.postContingencyStateKey(240, "contingency")); }