### Question:
FlagValueCalculator { public int getPriority(final ProtectedRegion region) { if (region == globalRegion) { return Integer.MIN_VALUE; } else { return region.getPriority(); } } FlagValueCalculator(List<ProtectedRegion> regions, @Nullable ProtectedRegion globalRegion); Result getMembership(RegionAssociable subject); @Nullable State queryState(@Nullable RegionAssociable subject, StateFlag... flags); @Nullable State queryState(@Nullable RegionAssociable subject, StateFlag flag); @Nullable V queryValue(@Nullable RegionAssociable subject, Flag<V> flag); Collection<V> queryAllValues(@Nullable RegionAssociable subject, Flag<V> flag); int getPriority(final ProtectedRegion region); @SuppressWarnings("unchecked") V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nullable RegionAssociable subject);  }### Answer:
@Test public void testGetEffectivePriority() throws Exception { MockApplicableRegionSet mock = new MockApplicableRegionSet(); ProtectedRegion region = mock.add(30); FlagValueCalculator result = mock.getFlagCalculator(); assertThat(result.getPriority(region), is(30)); }
@Test public void testGetEffectivePriorityGlobalRegion() throws Exception { MockApplicableRegionSet mock = new MockApplicableRegionSet(); ProtectedRegion region = mock.global(); FlagValueCalculator result = mock.getFlagCalculator(); assertThat(result.getPriority(region), is(Integer.MIN_VALUE)); }