public void testClusterBlockException() throws IOException {
   ClusterBlockException ex =
       serialize(
           new ClusterBlockException(ImmutableSet.of(DiscoverySettings.NO_MASTER_BLOCK_WRITES)));
   assertEquals("blocked by: [SERVICE_UNAVAILABLE/2/no master];", ex.getMessage());
   assertTrue(ex.blocks().contains(DiscoverySettings.NO_MASTER_BLOCK_WRITES));
   assertEquals(1, ex.blocks().size());
 }