### Question:
Environments { public static Environment getCurrent() { return cfEnvironment; } private  Environments(); static Environment getCurrent();  }### Answer:
@Test public void getCurrent_returnsOnlySingleInstance() { Environment firstEnvironment = Environments.getCurrent(); Environment secondEnvironment = Environments.getCurrent(); assertThat(firstEnvironment).isSameAs(secondEnvironment); }
@Test public void getCurrent_returnsCorrectEnvironment() { assertThat(Environments.getCurrent().getType()).isEqualTo(Environment.Type.CF); }