### Question:
QueryOpinionService { static boolean secondaryAttributeMatches(String eFlagsDecimalString, String attribute) { if (attribute == null) { return false; } if (!StringUtils.startsWithAny(attribute.toLowerCase(), "0x", "0b")) { return false; } int eFlagsInt = Integer.parseInt(eFlagsDecimalString); String eFlagsBinaryString = Integer.toBinaryString(eFlagsInt); if (eFlagsBinaryString == null) { return false; } eFlagsBinaryString = StringUtils.leftPad(eFlagsBinaryString, 32, "0"); String eFlagsHexString = Integer.toHexString(eFlagsInt); eFlagsHexString = StringUtils.leftPad(eFlagsHexString, 8, "0"); String cleaned = attribute.replace("_", "").replaceAll("\\s+", "").trim(); String prefix = cleaned.substring(0, 2); String value = cleaned.substring(2); if (prefix.toLowerCase().startsWith("0x")) { value = StringUtils.leftPad(value, 8, "0"); return value.equals(eFlagsHexString); } value = StringUtils.leftPad(value, 32, "0"); for (int i = 0; i < 32; i++) { char c = value.charAt(i); if (c == '.') { continue; } if (eFlagsBinaryString.charAt(i) != c) { return false; } } return true; }  static List<QueryResult> query(String loaderName, String primaryKey,
			String secondaryKey); static Set<QueryResult> getQueryResultWithSecondaryMasking(String secondaryKey,
			Map<String, Set<QueryResult>> byPrimary);  }### Answer:
@Test public void testSecondaryAttributeMatches() { String flags = "111"; String attribute = "0b 00.. ..00 .... .... 00.1 0.0. 0000 ...."; assertFalse(QueryOpinionService.secondaryAttributeMatches(flags, attribute)); flags = "821047567"; assertTrue(QueryOpinionService.secondaryAttributeMatches(flags, attribute)); assertTrue(QueryOpinionService.secondaryAttributeMatches(flags, attribute)); flags = "269423616"; assertTrue(QueryOpinionService.secondaryAttributeMatches(flags, attribute)); flags = "10817797"; assertTrue(QueryOpinionService.secondaryAttributeMatches(flags, attribute)); }