This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.euromoney.elasticsearch; | |
import org.elasticsearch.action.admin.cluster.health.ClusterHealthResponse; | |
import org.elasticsearch.client.transport.TransportClient; | |
import org.elasticsearch.common.settings.ImmutableSettings; | |
import org.elasticsearch.common.transport.InetSocketTransportAddress; | |
public class TransportClientSniffingTestMain { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ConvertObjectToEnumOneLineInstantiation { | |
/* | |
* To: | |
`HIGHLIGHT("highlight", false, "field", false, "title,description,body", null),` | |
* | |
* From: | |
* | |
`HIGHLIGHT { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* For the days you want to be predantic | |
*/ | |
@Test | |
public void shouldHaveAPrivateConstructor() throws Exception { | |
Constructor constructor = EuroSemanticResponse.class.getDeclaredConstructor(); | |
assertTrue("Constructor is not private", Modifier.isPrivate(constructor.getModifiers())); | |
constructor.setAccessible(true); |